diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2025-03-29 09:58:40 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2025-03-29 09:58:40 +0000 |
commit | 8b6a0e2392b9fc3f9b821da705797bb54c982dc1 (patch) | |
tree | 85794f1bba2c72fffc3b59a1d6fb60ce39bf13af /src/backend/executor/nodeModifyTable.c | |
parent | a0ed19e0a9efe93b3b83d6e3fe8f77656be253a2 (diff) | |
download | postgresql-8b6a0e2392b9fc3f9b821da705797bb54c982dc1.tar.gz postgresql-8b6a0e2392b9fc3f9b821da705797bb54c982dc1.zip |
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 <exclusion@gmail.com>
Author: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Gurjeet Singh <gurjeet@singh.im>
Discussion: https://postgr.es/m/18871-b44e3c96de3bd2e8%40postgresql.org
Backpatch-through: 15
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r-- | src/backend/executor/nodeModifyTable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 87c820276a8..309e27f8b5f 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -3784,7 +3784,7 @@ ExecInitMerge(ModifyTableState *mtstate, EState *estate) case CMD_NOTHING: break; default: - elog(ERROR, "unknown operation"); + elog(ERROR, "unknown action in MERGE WHEN clause"); break; } } |