diff options
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 930f2f1d5f4..7107bbf1642 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -90,13 +90,15 @@ _copyPlannedStmt(const PlannedStmt *from) COPY_NODE_FIELD(planTree); COPY_NODE_FIELD(rtable); COPY_NODE_FIELD(resultRelations); - COPY_NODE_FIELD(utilityStmt); COPY_NODE_FIELD(subplans); COPY_BITMAPSET_FIELD(rewindPlanIDs); COPY_NODE_FIELD(rowMarks); COPY_NODE_FIELD(relationOids); COPY_NODE_FIELD(invalItems); COPY_SCALAR_FIELD(nParamExec); + COPY_NODE_FIELD(utilityStmt); + COPY_LOCATION_FIELD(stmt_location); + COPY_LOCATION_FIELD(stmt_len); return newnode; } @@ -2767,6 +2769,20 @@ _copyQuery(const Query *from) COPY_NODE_FIELD(setOperations); COPY_NODE_FIELD(constraintDeps); COPY_NODE_FIELD(withCheckOptions); + COPY_LOCATION_FIELD(stmt_location); + COPY_LOCATION_FIELD(stmt_len); + + return newnode; +} + +static RawStmt * +_copyRawStmt(const RawStmt *from) +{ + RawStmt *newnode = makeNode(RawStmt); + + COPY_NODE_FIELD(stmt); + COPY_LOCATION_FIELD(stmt_location); + COPY_LOCATION_FIELD(stmt_len); return newnode; } @@ -4728,6 +4744,9 @@ copyObject(const void *from) case T_Query: retval = _copyQuery(from); break; + case T_RawStmt: + retval = _copyRawStmt(from); + break; case T_InsertStmt: retval = _copyInsertStmt(from); break; |