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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy