Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yvx3L-00060c-LR for pgsql-bugs@arkaria.postgresql.org; Sat, 23 May 2015 00:12:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yvx3L-0007Pe-3L for pgsql-bugs@arkaria.postgresql.org; Sat, 23 May 2015 00:12:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yvx3K-0007PT-5G for pgsql-bugs@postgresql.org; Sat, 23 May 2015 00:12:34 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Yvx3H-0003Ol-7J for pgsql-bugs@postgresql.org; Sat, 23 May 2015 00:12:33 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id D6829860001; Sat, 23 May 2015 02:12:29 +0200 (CEST) Date: Sat, 23 May 2015 02:12:27 +0200 From: Andres Freund To: chris@chrullrich.net Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13336: Unexpected result from invalid query Message-ID: <20150523001227.GA32396@alap3.anarazel.de> References: <20150523000527.17709.45231@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150523000527.17709.45231@wrigleys.postgresql.org> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs