pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Johnston <polobo@yahoo.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery
Date: Mon, 11 Nov 2013 11:12:16 -0500
Message-ID: <32617.1384186336@sss.pgh.pa.us> (raw)
In-Reply-To: <1379086891857-5770710.post@n5.nabble.com>
References: <E1VJuBy-0002a1-Qv@wrigleys.postgresql.org>
	<1379027562361-5770654.post@n5.nabble.com>
	<1080.1379085600@sss.pgh.pa.us>
	<1379086891857-5770710.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

[ for the archives' sake ]

David Johnston <polobo@yahoo.com> 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



view thread (5+ messages)

Message-ID: <32617.1384186336@sss.pgh.pa.us>
Permalink:  ../32617.1384186336@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/32617.1384186336@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, polobo@yahoo.com
  Subject: Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery
  In-Reply-To: <32617.1384186336@sss.pgh.pa.us>
  References: <E1VJuBy-0002a1-Qv@wrigleys.postgresql.org> <1379027562361-5770654.post@n5.nabble.com> <1080.1379085600@sss.pgh.pa.us> <1379086891857-5770710.post@n5.nabble.com> <32617.1384186336@sss.pgh.pa.us>

* 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