summaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index edc055dfdb..95e793d936 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.27 1998/01/04 04:31:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.28 1998/01/09 05:48:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1520,6 +1520,16 @@ _copyQuery(Query *from)
int i;
newnode->commandType = from->commandType;
+ if (from->utilityStmt && nodeTag(from->utilityStmt) == T_NotifyStmt)
+ {
+ NotifyStmt *from_notify = (NotifyStmt *) from->utilityStmt;
+ NotifyStmt *n = makeNode(NotifyStmt);
+ int length = strlen(from_notify->relname);
+
+ n->relname = palloc(length + 1);
+ strcpy(n->relname, from_notify->relname);
+ newnode->utilityStmt = (Node *) n;
+ }
newnode->resultRelation = from->resultRelation;
/* probably should dup this string instead of just pointing */
/* to the old one --djm */
@@ -1532,17 +1542,8 @@ _copyQuery(Query *from)
newnode->into = (char *) 0;
}
newnode->isPortal = from->isPortal;
- Node_Copy(from, newnode, rtable);
- if (from->utilityStmt && nodeTag(from->utilityStmt) == T_NotifyStmt)
- {
- NotifyStmt *from_notify = (NotifyStmt *) from->utilityStmt;
- NotifyStmt *n = makeNode(NotifyStmt);
- int length = strlen(from_notify->relname);
-
- n->relname = palloc(length + 1);
- strcpy(n->relname, from_notify->relname);
- newnode->utilityStmt = (Node *) n;
- }
+ newnode->isBinary = from->isBinary;
+ newnode->unionall = from->unionall;
if (from->uniqueFlag)
{
newnode->uniqueFlag = (char *) palloc(strlen(from->uniqueFlag) + 1);
@@ -1551,6 +1552,7 @@ _copyQuery(Query *from)
else
newnode->uniqueFlag = NULL;
Node_Copy(from, newnode, sortClause);
+ Node_Copy(from, newnode, rtable);
Node_Copy(from, newnode, targetList);
Node_Copy(from, newnode, qual);