Re: BUG #5233: delete wrong doing with subquery where condition - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #5233: delete wrong doing with subquery where condition
Date
Msg-id 4B18B872.4040103@enterprisedb.com
Whole thread Raw
In response to BUG #5233: delete wrong doing with subquery where condition  ("Fred Wei" <weif@niwa.co.nz>)
List pgsql-bugs
Fred Wei wrote:
> cod_old=# delete from tmp where k in (select k from tmp2);
> DELETE 1
> --this is wrong, because k does not exist in tmp2!

That behavior is correct, k is referring to tmp.k. See
http://archives.postgresql.org/message-id/200910160726.n9G7QEEg097413@wwwmaster.postgresql.org

This should be added to the FAQ...

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5217: (new) error with VB 6.0 SP 6 and psqlODBC 8.4.1
Next
From: "Nasby, Jim"
Date:
Subject: ossp/uuid.h error during configure of 8_3_STABLE