Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9086c46f224b184496a15d94f9242b60fceb4afb
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-04-18T18:13:31Z
Releases: 7.4.3
Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses
are sought first as local FROM columns, then as local SELECT-list aliases,
and finally as outer FROM columns; the former behavior made outer FROM
columns take precedence over aliases.  This does not change spec
conformance because SQL99 allows only the first case anyway, and it seems
more useful and self-consistent.  Per gripe from Dennis Bjorklund 2004-04-05.

Files