Re: BUG #13336: Unexpected result from invalid query - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #13336: Unexpected result from invalid query
Date
Msg-id 20150523001227.GA32396@alap3.anarazel.de
Whole thread Raw
In response to BUG #13336: Unexpected result from invalid query  (chris@chrullrich.net)
Responses Re: BUG #13336: Unexpected result from invalid query
List pgsql-bugs
Hi,

On 2015-05-23 00:05:27 +0000, chris@chrullrich.net wrote:
> -- Note: No column "foo" in test_table2
> postgres=# select * from test_table where foo in (select foo from
> test_table2);
>  foo | bar
> -----+-----
>  one |   1
>  two |   2

That's not a bug. In a good number of subqueries you need access fields
from the surrounding query.

Greetings,

Andres Freund

pgsql-bugs by date:

Previous
From: Christian Ullrich
Date:
Subject: Re: BUG #13336: Unexpected result from invalid query
Next
From: Christian Ullrich
Date:
Subject: Re: BUG #13336: Unexpected result from invalid query