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