diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-04-18 18:12:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-04-18 18:12:58 +0000 |
commit | b5e52b080c7bfb62531133a4937661e1684b978b (patch) | |
tree | d4b2f117921d856e3e6bd8a8f2147835dd571853 /src/include/parser/parse_relation.h | |
parent | 3e2aef58a28fef7bf0cf46065eba0eff1bb0722c (diff) | |
download | postgresql-b5e52b080c7bfb62531133a4937661e1684b978b.tar.gz postgresql-b5e52b080c7bfb62531133a4937661e1684b978b.zip |
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.
Diffstat (limited to 'src/include/parser/parse_relation.h')
-rw-r--r-- | src/include/parser/parse_relation.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h index 0fa75d0297d..724639dd96a 100644 --- a/src/include/parser/parse_relation.h +++ b/src/include/parser/parse_relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.43 2004/04/02 19:07:02 tgl Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_relation.h,v 1.44 2004/04/18 18:12:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ extern RangeTblEntry *GetRTEByRangeTablePosn(ParseState *pstate, int sublevels_up); extern Node *scanRTEForColumn(ParseState *pstate, RangeTblEntry *rte, char *colname); -extern Node *colnameToVar(ParseState *pstate, char *colname); +extern Node *colNameToVar(ParseState *pstate, char *colname, bool localonly); extern Node *qualifiedNameToVar(ParseState *pstate, char *schemaname, char *refname, |