Content-Length: 258445 | pFad | http://github.com/postgrespro/postgres/commit/6ff5aa129933fbde034c0d21c28cf05e052511f9

19 Fix MERGE tuple count with DO NOTHING · postgrespro/postgres@6ff5aa1 · GitHub
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

Lines changed: 1 addition & 1 deletion
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/6ff5aa129933fbde034c0d21c28cf05e052511f9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy