pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: anisimovt@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6490: Not checking column existence in sub query
Date: Mon, 27 Feb 2012 15:26:02 +0100
Message-ID: <20120227142602.GA12584@depesz.com> (raw)
In-Reply-To: <E1S1yvr-0002PZ-2P@wrigleys.postgresql.org>
References: <E1S1yvr-0002PZ-2P@wrigleys.postgresql.org>

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/



view thread (2+ messages)

Message-ID: <20120227142602.GA12584@depesz.com>
Permalink:  ../20120227142602.GA12584@depesz.com/
Also on:    postgresql.org/message-id/20120227142602.GA12584@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: depesz@depesz.com, anisimovt@gmail.com
  Subject: Re: BUG #6490: Not checking column existence in sub query
  In-Reply-To: <20120227142602.GA12584@depesz.com>
  References: <E1S1yvr-0002PZ-2P@wrigleys.postgresql.org> <20120227142602.GA12584@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox