Fix handling of oldtuple to match PG17 upstream (#7340)

A [previous
commit](d7513b26f6)
I made added support for MERGE ... RETURNING ....
While working on the coverity fix, I realized that this code handling
oldtuple was not added; that's what this fixes.

Disable-check: force-changelog-file
This commit is contained in:
Keyur Panchal 2024-10-24 16:51:13 -06:00 committed by GitHub
parent 04f0b47ca7
commit 650d331838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -461,6 +461,12 @@ lmerge_matched:;
* visible to our MVCC snapshot.
*/
#if PG17_GE
if (oldtuple != NULL)
ExecForceStoreHeapTuple(oldtuple, resultRelInfo->ri_oldTupleSlot,
false);
else
#endif
if (!table_tuple_fetch_row_version(resultRelInfo->ri_RelationDesc,
tupleid,
SnapshotAny,