aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-04-18 18:12:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-04-18 18:12:58 +0000
commitb5e52b080c7bfb62531133a4937661e1684b978b (patch)
treed4b2f117921d856e3e6bd8a8f2147835dd571853 /src/backend/parser/parse_expr.c
parent3e2aef58a28fef7bf0cf46065eba0eff1bb0722c (diff)
downloadpostgresql-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/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index acee2b300e4..2747ec3ed43 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.168 2004/04/02 19:06:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_expr.c,v 1.169 2004/04/18 18:12:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -966,7 +966,7 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref)
char *name = strVal(lfirst(cref->fields));
/* Try to identify as an unqualified column */
- node = colnameToVar(pstate, name);
+ node = colNameToVar(pstate, name, false);
if (node == NULL)
{