On Thu, 1 Jul 2004, James Robinson wrote:

> Why in the world does this statement parse and run:
>
> orig_sav=# delete from realtycompany_contacts where contact_id in
> (select contact_id from users);
> DELETE 1634
>
> Since users has *no* column contact_id ? One would expect the statement
> to fail, and the transaction to get rolled back.

AFAIK the spec requires that subselects like that can reference outer
columns so contact_id inside the subselect refers to the outer contact_id
column which does exist (which makes the effective behavior of the above
clause the same as contact_id is not null I think)

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to