aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-08-30 01:39:14 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-08-30 01:39:14 +0000
commit449a00fbbd49c00ba031432e8b6913a55e8ad1f6 (patch)
treec19cdeb09e444071accc7f4984d2067741988f86 /src/backend/parser/parse_clause.c
parent6253f9de6702fa73101997034b4fec038d547f6d (diff)
downloadpostgresql-449a00fbbd49c00ba031432e8b6913a55e8ad1f6.tar.gz
postgresql-449a00fbbd49c00ba031432e8b6913a55e8ad1f6.zip
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.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r--src/backend/parser/parse_clause.c5
1 files changed, 3 insertions, 2 deletions
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;