aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-23 17:10:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-23 17:10:54 +0000
commit27edff700efdcecb11421c922a68149b8a9d457c (patch)
tree72e9f0b7fecb99c8bfd1091c5431212d0f49bd57 /src/backend/parser/analyze.c
parenta712570880510e94fa987b891d7b6179786611a7 (diff)
downloadpostgresql-27edff700efdcecb11421c922a68149b8a9d457c.tar.gz
postgresql-27edff700efdcecb11421c922a68149b8a9d457c.zip
Still another place to make the world safe for zero-column tables:
remove the ancient (and always pretty dodgy) assumption in parse_clause.c that a query can't have an empty targetlist.
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 4a251b63de4..2b1eddbcf09 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.299 2004/05/05 04:48:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.300 2004/05/23 17:10:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1929,17 +1929,17 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
*/
qry->sortClause = transformSortClause(pstate,
stmt->sortClause,
- qry->targetList,
+ &qry->targetList,
true /* fix unknowns */ );
qry->groupClause = transformGroupClause(pstate,
stmt->groupClause,
- qry->targetList,
+ &qry->targetList,
qry->sortClause);
qry->distinctClause = transformDistinctClause(pstate,
stmt->distinctClause,
- qry->targetList,
+ &qry->targetList,
&qry->sortClause);
qry->limitOffset = transformLimitClause(pstate, stmt->limitOffset,
@@ -2145,7 +2145,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
qry->sortClause = transformSortClause(pstate,
sortClause,
- qry->targetList,
+ &qry->targetList,
false /* no unknowns expected */ );
pstate->p_namespace = sv_namespace;