| 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 actions blocked by BEFORE ROW triggers |
| Date: | 2023-03-13 11:14:40 |
| Message-ID: | E1pbg8V-003Jnt-PY@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix MERGE command tag for actions blocked by BEFORE ROW triggers.
This ensures that the row count in the command tag for a MERGE is
correctly computed in the case where UPDATEs or DELETEs are skipped
due to a BEFORE ROW trigger returning NULL (the INSERT case was
already handled correctly by ExecMergeNotMatched() calling
ExecInsert()).
Back-patch to v15, where MERGE was introduced.
Discussion: https://postgr.es/m/CAEZATCU8XEmR0JWKDtyb7iZ%3DqCffxS9uyJt0iOZ4TV4RT%2Bow1w%40mail.gmail.com
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/da6257eee35db5d281a115838abaf285b46b52f3
Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 10 ++++++----
src/test/regress/expected/merge.out | 15 +++++++++++++++
src/test/regress/sql/merge.sql | 13 +++++++++++++
3 files changed, 34 insertions(+), 4 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2023-03-13 14:12:32 | pgsql: Add a DEFAULT option to COPY FROM |
| Previous Message | Dean Rasheed | 2023-03-13 10:25:16 | pgsql: Fix concurrent update issues with MERGE. |