Re: Subselect strange behaviour - bug? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Subselect strange behaviour - bug?
Date
Msg-id 430.1205692088@sss.pgh.pa.us
Whole thread Raw
In response to Subselect strange behaviour - bug?  (Mario Splivalo <mario.splivalo@megafon.hr>)
Responses Re: Subselect strange behaviour - bug?
List pgsql-sql
Mario Splivalo <mario.splivalo@megafon.hr> 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;
that is, what you wrote is equivalent toselect * from t2 where id1 in (select t2.id1 from t1);
        regards, tom lane


pgsql-sql by date:

Previous
From: Mario Splivalo
Date:
Subject: Subselect strange behaviour - bug?
Next
From: Mario Splivalo
Date:
Subject: Re: Subselect strange behaviour - bug?