Re: Unexpected behaviour, definitely looks like a bug. - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Unexpected behaviour, definitely looks like a bug.
Date
Msg-id CAKFQuwa97GEXrb2XgjaRQmLmTDzAad81trXh3Ajd90trVJAqRA@mail.gmail.com
Whole thread Raw
In response to Unexpected behaviour, definitely looks like a bug.  (Leshchuk Aleksey <leshchuk.aleksey@aurea.com>)
List pgsql-bugs
On Tue, Apr 9, 2019 at 3:02 PM Leshchuk Aleksey <leshchuk.aleksey@aurea.com> wrote:
PostgresQL version 9.4.20

WITH test(id, not_id) AS (
SELECT * FROM (VALUES (1,1), (3,4)) AS t
),

test2(id1) AS (
SELECT * FROM (VALUES (2), (3) ) AS t
)
-- SELECT not_id FROM test2 -- ERROR column "not_id" does not exist
SELECT * FROM test WHERE id IN ( SELECT not_id FROM test2 ); -- <-- not_id selected from test table no ERROR, result is: 1,1
You've introduced a correlated subquery due to insufficient use of table qualifiers on column names.


David J.

pgsql-bugs by date:

Previous
From: Nikolay Samokhvalov
Date:
Subject: Re: Unexpected behaviour, definitely looks like a bug.
Next
From: Bruce Rindahl
Date:
Subject: Failure of initdb