Re: BUG #6490: Not checking column existence in sub query - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject Re: BUG #6490: Not checking column existence in sub query
Date
Msg-id 20120227142602.GA12584@depesz.com
Whole thread Raw
In response to BUG #6490: Not checking column existence in sub query  (anisimovt@gmail.com)
List pgsql-bugs
On Mon, Feb 27, 2012 at 11:39:55AM +0000, anisimovt@gmail.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      6490
> Logged by:          Timofey Anisimov
> Email address:      anisimovt@gmail.com
> PostgreSQL version: 9.1.2
> Operating system:   Linux
> Description:
>
> SELECT * FROM table1 where col1 in (select col2 from table2)
>
> if col2 exist in table1 and not exist in table2 there will be no error and
> query output all rows from table1;

sure. it is so called "correlated subquery" and it's definitely not
a bug.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

pgsql-bugs by date:

Previous
From: anisimovt@gmail.com
Date:
Subject: BUG #6490: Not checking column existence in sub query
Next
From: curd.reinert@ppi.de
Date:
Subject: BUG #6494: Listening to * fails for IP V6