Re: BUG #13336: Unexpected result from invalid query

From: Andres Freund <andres(at)anarazel(dot)de>
To: chris(at)chrullrich(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13336: Unexpected result from invalid query
Date: 2015-05-23 00:12:27
Message-ID: 20150523001227.GA32396@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2015-05-23 00:05:27 +0000, chris(at)chrullrich(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Christian Ullrich 2015-05-23 00:31:10 Re: BUG #13336: Unexpected result from invalid query
Previous Message Christian Ullrich 2015-05-23 00:08:12 Re: BUG #13336: Unexpected result from invalid query