From 449a00fbbd49c00ba031432e8b6913a55e8ad1f6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 30 Aug 2008 01:39:14 +0000 Subject: Fix the raw-parsetree representation of star (as in SELECT * FROM or SELECT foo.*) so that it cannot be confused with a quoted identifier "*". Instead create a separate node type A_Star to represent this notation. Per pgsql-hackers discussion of 2007-Sep-27. --- src/backend/parser/parse_clause.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/parser/parse_clause.c') diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 7097ef50582..5285f0ba3d9 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.177 2008/08/28 23:09:47 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_clause.c,v 1.178 2008/08/30 01:39:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1181,7 +1181,8 @@ findTargetlistEntry(ParseState *pstate, Node *node, List **tlist, int clause) *---------- */ if (IsA(node, ColumnRef) && - list_length(((ColumnRef *) node)->fields) == 1) + list_length(((ColumnRef *) node)->fields) == 1 && + IsA(linitial(((ColumnRef *) node)->fields), String)) { char *name = strVal(linitial(((ColumnRef *) node)->fields)); int location = ((ColumnRef *) node)->location; -- cgit v1.2.3