Search Postgresql Archives

Re: Is this a bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Harry Jackson wrote:
> 
> The following sql statement fails because the column "user_id" does
> not exist in the users table.
> 
> =# select user_id from users WHERE  username = 'blah';
> ERROR:  column "user_id" does not exist
> LINE 1: select user_id from users WHERE  username = 'blah......
>                ^
[...]
>
> =# delete from map_users_roles where user_id = (select user_id from
> users WHERE  username = 'blah');
> DELETE 33631
> 
[...]
> 
> Still, this was quite a suprise to me and I would consider this a bug.
>
> Thoughts?

It is not a bug, but it is one of the best examples why it is good to
always qualify columns that I have ever seen!

Yours,
Laurenz Albe


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux