public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dean Rasheed <[email protected]>
To: [email protected]
Subject: pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.
Date: Sat, 29 Mar 2025 10:00:30 +0000
Message-ID: <[email protected]> (raw)
Fix MERGE with DO NOTHING actions into a partitioned table.
ExecInitPartitionInfo() duplicates much of the logic in
ExecInitMerge(), except that it failed to handle DO NOTHING
actions. This would cause an "unknown action in MERGE WHEN clause"
error if a MERGE with any DO NOTHING actions attempted to insert into
a partition not already initialised by ExecInitModifyTable().
Bug: #18871
Reported-by: Alexander Lakhin <[email protected]>
Author: Tender Wang <[email protected]>
Reviewed-by: Gurjeet Singh <[email protected]>
Discussion: https://postgr.es/m/18871-b44e3c96de3bd2e8%40postgresql.org
Backpatch-through: 15
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8d4cd3b4a88713bb1083ebee9e6e81bd703f4c3b
Modified Files
--------------
src/backend/executor/execPartition.c | 4 +++-
src/backend/executor/nodeModifyTable.c | 2 +-
src/test/regress/expected/merge.out | 17 +++++++++++++++++
src/test/regress/sql/merge.sql | 13 +++++++++++++
4 files changed, 34 insertions(+), 2 deletions(-)
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Fix MERGE with DO NOTHING actions into a partitioned table.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox