Re: Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery
Date
Msg-id 32617.1384186336@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #8444: ERROR: table name "tblb" specified more than once in subquery  (David Johnston <polobo@yahoo.com>)
List pgsql-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

pgsql-bugs by date:

Previous
From: digoal
Date:
Subject: Re: BUG #8531: systemtap probe mark(checkpoint__done) error when i read the parameters
Next
From: noloader@gmail.com
Date:
Subject: BUG #8588: Need work arounds for Apple unaligned access