diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-11-17 18:56:11 +0100 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-11-17 18:56:11 +0100 |
commit | 6ff5aa129933fbde034c0d21c28cf05e052511f9 (patch) | |
tree | 59348a6b39759f7ad906225469124e813e915382 /src/backend/executor/nodeModifyTable.c | |
parent | 813492dacceecb752725b7e370ac7f5748b1edf9 (diff) | |
download | postgresql-6ff5aa129933fbde034c0d21c28cf05e052511f9.tar.gz |
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
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 0f357f8221..b7ea953b55 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -2799,7 +2799,7 @@ lmerge_matched: { case TM_Ok: /* all good; perform final actions */ - if (canSetTag) + if (canSetTag && commandType != CMD_NOTHING) (estate->es_processed)++; break; |