Re: Regression from 7.3 to 7.4 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Regression from 7.3 to 7.4
Date
Msg-id 6569.1082312815@sss.pgh.pa.us
Whole thread Raw
In response to Re: Regression from 7.3 to 7.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Dennis Bjorklund <db@zigo.dhs.org> writes:
>> This testcase works in 7.3 but not in 7.4:

>> create table t1 (a int);
>> create table t2 (b int);
>> select * from t1, (select b as a from t2 group by a) as foo;

> Another tweak we could make is to cause findTargetlistEntry() to look
> only for local variable names before looking for targetlist alias
> matches.  This would effectively change the precedence for resolving
> "GROUP BY x" to be (1) x as a local variable, (2) x as a targetlist
> alias, (3) x as an outer variable; whereas the present search order is
> (1), (3), (2).  AFAICS this does not break compatibility with either
> SQL92 or SQL99 because both of them allow only case (1).

I've patched both 7.4 and HEAD branches to do things this way.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: executing prepared select, missing RowDescription info
Next
From: Christopher Kings-Lynne
Date:
Subject: ON COMMIT DROP