Content-Length: 274520 | pFad | https://github.com/postgrespro/postgres/commit/920311ab18aac799aee6ad2303b2ed2b6b44c1b8

EC For 11 only, put back heap_expand_tuple to GetTupleForTrigger(). · postgrespro/postgres@920311a · GitHub
Skip to content

Commit 920311a

Browse files
committed
For 11 only, put back heap_expand_tuple to GetTupleForTrigger().
This is not necessary anymore after 297d627, but extensions that have not been recompiled after the fix will not use the new definition of heap_getattr(). While recompiling those extensions is obviously the suggested course, it's cheap enough to retain the expansion in GetTupleForTrigger(). Per suggestion from Andrew Gierth. Discussion: 87va1x43ot.fsf@news-spur.riddles.org.uk
1 parent 35afcca commit 920311a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/backend/commands/trigger.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3396,7 +3396,15 @@ ltrmark:;
33963396
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
33973397
}
33983398

3399-
result = heap_copytuple(&tuple);
3399+
/*
3400+
* While this is not necessary anymore after 297d627e, as a defense
3401+
* against C code that has not recompiled for minor releases after the
3402+
* fix, continue to expand the tuple.
3403+
*/
3404+
if (HeapTupleHeaderGetNatts(tuple.t_data) < relation->rd_att->natts)
3405+
result = heap_expand_tuple(&tuple, relation->rd_att);
3406+
else
3407+
result = heap_copytuple(&tuple);
34003408
ReleaseBuffer(buffer);
34013409

34023410
return result;

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: https://github.com/postgrespro/postgres/commit/920311ab18aac799aee6ad2303b2ed2b6b44c1b8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy