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

Commit 3d45edc

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 41afaa1 commit 3d45edc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ lmerge_matched:;
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)