OSDN Git Service

Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 18 Apr 2004 18:12:58 +0000 (18:12 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 18 Apr 2004 18:12:58 +0000 (18:12 +0000)
commitb5e52b080c7bfb62531133a4937661e1684b978b
treed4b2f117921d856e3e6bd8a8f2147835dd571853
parent3e2aef58a28fef7bf0cf46065eba0eff1bb0722c
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.
src/backend/parser/parse_clause.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_relation.c
src/include/parser/parse_relation.h