summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r--src/backend/executor/nodeModifyTable.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index bb5904b9e6..66ebf02849 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -243,7 +243,7 @@ ExecInsert(TupleTableSlot *slot,
#ifdef PGXC
if (IS_PGXC_COORDINATOR && resultRemoteRel)
{
- ExecRemoteInsert(resultRelationDesc, (RemoteQueryState *)resultRemoteRel, slot);
+ ExecRemoteQueryStandard(resultRelationDesc, (RemoteQueryState *)resultRemoteRel, slot);
}
else
#endif
@@ -501,6 +501,9 @@ ExecUpdate(ItemPointer tupleid,
ItemPointerData update_ctid;
TransactionId update_xmax;
List *recheckIndexes = NIL;
+#ifdef PGXC
+ PlanState *resultRemoteRel = NULL;
+#endif
/*
* abort the operation if not running transactions
@@ -519,6 +522,9 @@ ExecUpdate(ItemPointer tupleid,
*/
resultRelInfo = estate->es_result_relation_info;
resultRelationDesc = resultRelInfo->ri_RelationDesc;
+#ifdef PGXC
+ resultRemoteRel = estate->es_result_remoterel;
+#endif
/* BEFORE ROW UPDATE Triggers */
if (resultRelInfo->ri_TrigDesc &&
@@ -570,6 +576,14 @@ lreplace:;
if (resultRelationDesc->rd_att->constr)
ExecConstraints(resultRelInfo, slot, estate);
+#ifdef PGXC
+ if (IS_PGXC_COORDINATOR && resultRemoteRel)
+ {
+ ExecRemoteQueryStandard(resultRelationDesc, (RemoteQueryState *)resultRemoteRel, slot);
+ }
+ else
+ {
+#endif
/*
* replace the heap tuple
*
@@ -643,6 +657,9 @@ lreplace:;
if (resultRelInfo->ri_NumIndices > 0 && !HeapTupleIsHeapOnly(tuple))
recheckIndexes = ExecInsertIndexTuples(slot, &(tuple->t_self),
estate);
+#ifdef PGXC
+ }
+#endif
}
if (canSetTag)