Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfu6A-00088T-8Q for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Nov 2013 16:12:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vfu69-00084E-GQ for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Nov 2013 16:12:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfu67-000843-Ir for pgsql-bugs@postgresql.org; Mon, 11 Nov 2013 16:12:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfu64-0004e3-UA for pgsql-bugs@postgresql.org; Mon, 11 Nov 2013 16:12:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rABGCGxl032618; Mon, 11 Nov 2013 11:12:16 -0500 From: Tom Lane To: David Johnston cc: pgsql-bugs@postgresql.org Subject: Re: Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery In-reply-to: <1379086891857-5770710.post@n5.nabble.com> References: <1379027562361-5770654.post@n5.nabble.com> <1080.1379085600@sss.pgh.pa.us> <1379086891857-5770710.post@n5.nabble.com> Comments: In-reply-to David Johnston message dated "Fri, 13 Sep 2013 08:41:31 -0700" Date: Mon, 11 Nov 2013 11:12:16 -0500 Message-ID: <32617.1384186336@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 [ for the archives' sake ] David Johnston writes: > Tom Lane-2 wrote >> This is an intentional change that came in with the LATERAL feature. >> The query is illegal per SQL spec but we used to allow it anyway, >> on the theory that the table name "u" inside the aliased join "x" >> wasn't visible anywhere that the other "u" was visible, so the >> duplicate alias name was harmless. But in the presence of LATERAL >> it's not harmless; consider > While the behavior is intentional not mentioning it in the release notes, > is an oversight that should be corrected. The point that this is an incompatible change is a good one. I've reconsidered and concluded it's better to remove the duplicate-alias check; instead, we'll throw an error if there actually is an ambiguous reference in a LATERAL subquery. This patch will appear in 9.3.2. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs