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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

Reply via email to