aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2023-02-22 09:39:09 +0000
committerDean Rasheed <dean.a.rasheed@gmail.com>2023-02-22 09:39:09 +0000
commit80a48e0f21c51ed65fe647b18019ab6f8eab15cd (patch)
tree71ce807c5e89ffbb52d6e7b89fd9a478054391c6 /src/backend/executor/nodeModifyTable.c
parent2ddab010c2777c6a965cea82dc1b809ddc33ecc1 (diff)
downloadpostgresql-80a48e0f21c51ed65fe647b18019ab6f8eab15cd.tar.gz
postgresql-80a48e0f21c51ed65fe647b18019ab6f8eab15cd.zip
Fix MERGE command tag for cross-partition updates.
This ensures that the row count in the command tag for a MERGE is correctly computed. Previously, if MERGE updated a partitioned table, the row count would be incorrect if any row was moved to a different partition, since such updates were counted twice. Back-patch to v15, where MERGE was introduced. Discussion: https://postgr.es/m/CAEZATCWRMG7XX2QEsVL1LswmNo2d_YG8tKTLkpD3=Lp644S7rg@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r--src/backend/executor/nodeModifyTable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index a94d7f86e54..6f0543af832 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -2878,7 +2878,7 @@ lmerge_matched:
}
ExecUpdatePrepareSlot(resultRelInfo, newslot, context->estate);
result = ExecUpdateAct(context, resultRelInfo, tupleid, NULL,
- newslot, mtstate->canSetTag, &updateCxt);
+ newslot, false, &updateCxt);
if (result == TM_Ok && updateCxt.updated)
{
ExecUpdateEpilogue(context, &updateCxt, resultRelInfo,