Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6ff5aa1

Browse files
committed
Fix MERGE tuple count with DO NOTHING
Reporting tuples for which nothing is done is useless and goes against the documented behavior, so don't do it. Backpatch to 15. Reported by: Luca Ferrari Discussion: https://postgr.es/m/CAKoxK+42MmACUh6s8XzASQKizbzrtOGA6G1UjzCP75NcXHsiNw@mail.gmail.com
1 parent 813492d commit 6ff5aa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/nodeModifyTable.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ ExecMergeMatched(ModifyTableContext *context, ResultRelInfo *resultRelInfo,
27992799
{
28002800
case TM_Ok:
28012801
/* all good; perform final actions */
2802-
if (canSetTag)
2802+
if (canSetTag && commandType != CMD_NOTHING)
28032803
(estate->es_processed)++;
28042804

28052805
break;

0 commit comments

Comments
 (0)