public inbox for [email protected]help / color / mirror / Atom feed
pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. @ 2025-03-29 10:00 Dean Rasheed <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dean Rasheed @ 2025-03-29 10:00 UTC (permalink / raw) To: [email protected] 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8b6a0e2392b9fc3f9b821da705797bb54c982dc1 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. @ 2025-03-29 10:00 Dean Rasheed <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dean Rasheed @ 2025-03-29 10:00 UTC (permalink / raw) To: [email protected] 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_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/25303678a1d334200c0f1446eef2ebe1aaf2709b 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. @ 2025-03-29 10:00 Dean Rasheed <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dean Rasheed @ 2025-03-29 10:00 UTC (permalink / raw) To: [email protected] 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. @ 2025-03-29 10:00 Dean Rasheed <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dean Rasheed @ 2025-03-29 10:00 UTC (permalink / raw) To: [email protected] 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_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/14a33d3f0ae6dcbe9b91d33f64b795c2aef6a870 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-03-29 10:00 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-03-29 10:00 pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. Dean Rasheed <[email protected]> 2025-03-29 10:00 pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. Dean Rasheed <[email protected]> 2025-03-29 10:00 pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. Dean Rasheed <[email protected]> 2025-03-29 10:00 pgsql: Fix MERGE with DO NOTHING actions into a partitioned table. Dean Rasheed <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox