pgsql: Fix MERGE command tag for cross-partition updates.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix MERGE command tag for cross-partition updates.
Date: 2023-02-22 09:43:06
Message-ID: E1pUleT-0006tz-Nc@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/018af1cc1c8075346e6a5fe3bb77b7e31399be70

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 2 +-
src/test/regress/expected/merge.out | 16 ++++++++++++++++
src/test/regress/sql/merge.sql | 11 +++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-02-22 10:10:37 pgsql: doc: Add default value of createrole_self_grant
Previous Message Peter Eisentraut 2023-02-22 08:42:26 pgsql: Implement ANY_VALUE aggregate