On 22-Dec-07, at 7:14 PM, Michael Glaesemann wrote:
It may be that SQL is doing exactly as it should, since 'id' is in
scope within the subselect, but if that's the case it's a nasty
gotcha.
Yes, and yes.
Ow. Thanks for confirming both my suspicions and my fears :-)
R.
Wondering if this is actually a bug, before I file a bug report on it.
Consider this sequence:
=# create table public.test1 (id int);
CREATE TABLE
=# create table public.test2 (it int);
CREATE TABLE
=# select * from test1 where id in (select id from test2);
id
(0 rows)
Note that the sele