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

From Mario Splivalo
Subject Re: Subselect strange behaviour - bug?
Date
Msg-id 47DE5E5B.60203@megafon.hr
Whole thread Raw
In response to Re: Subselect strange behaviour - bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom Lane wrote:
> 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 to
>     select * from t2 where id1 in (select t2.id1 from t1);
>
>   
Huh, you're right. Appologies for the noise :)
   Mario


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Subselect strange behaviour - bug?
Next
From: "Chadwick Horn"
Date:
Subject: postgres server crashes unexpectedly