aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-11-05 00:15:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-11-05 00:15:54 +0000
commit11f7b29054fd24c7e6dd1d2a8734cbebf3585b25 (patch)
tree917e7ebbac724a341962e09cb9c775eaf2d1bab4 /src/backend/nodes/copyfuncs.c
parent66436e66e1bfffb6ba3f11114c5b825e56437e7d (diff)
downloadpostgresql-11f7b29054fd24c7e6dd1d2a8734cbebf3585b25.tar.gz
postgresql-11f7b29054fd24c7e6dd1d2a8734cbebf3585b25.zip
Allow ORDER BY, LIMIT in sub-selects. Fix most (not all) cases where
the grammar did not allow redundant parentheses around sub-selects. Distinguish LIMIT ALL from LIMIT 0; make the latter behave as one would expect.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 9435a396f07..406e85ce623 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.128 2000/10/31 10:22:10 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.129 2000/11/05 00:15:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1826,6 +1826,7 @@ _copySelectStmt(SelectStmt *from)
Node_Copy(from, newnode, distinctClause);
if (from->into)
newnode->into = pstrdup(from->into);
+ newnode->istemp = from->istemp;
Node_Copy(from, newnode, targetList);
Node_Copy(from, newnode, fromClause);
Node_Copy(from, newnode, whereClause);
@@ -1835,10 +1836,13 @@ _copySelectStmt(SelectStmt *from)
if (from->portalname)
newnode->portalname = pstrdup(from->portalname);
newnode->binary = from->binary;
- newnode->istemp = from->istemp;
Node_Copy(from, newnode, limitOffset);
Node_Copy(from, newnode, limitCount);
Node_Copy(from, newnode, forUpdate);
+ newnode->op = from->op;
+ newnode->all = from->all;
+ Node_Copy(from, newnode, larg);
+ Node_Copy(from, newnode, rarg);
return newnode;
}