Re: [SQL] Subselect strange behaviour - bug?

2008-03-16 Thread Tom Lane
Mario Splivalo <[EMAIL PROTECTED]> writes: > And here is the 'problematic' query: > melem=# select * from t2 where id1 in (select id1 from t1); > I guess postgres should tell me that column name id1 is nonexistant in > table t1. No, it shouldn't, because that's a perfectly legal outer reference;

[SQL] Subselect strange behaviour - bug?

2008-03-16 Thread Mario Splivalo
I have two tables, 'configured' like this: melem=# \d t1 Table "public.t1" Column | Type| Modifiers +---+--- id | integer | value | character varying | melem=# \d t2 Table "public.t2" Column | Type