Thread: pgsql-server/src backend/parser/parse_clause.c ...

pgsql-server/src backend/parser/parse_clause.c ...

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    tgl@svr1.postgresql.org    04/04/18 15:12:58

Modified files:
    src/backend/parser: parse_clause.c parse_expr.c parse_relation.c
    src/include/parser: parse_relation.h

Log message:
    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.