aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/trigger.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index d7ffc9c3e2b..f6c7a3fefc5 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -3396,7 +3396,15 @@ ltrmark:;
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
}
- result = heap_copytuple(&tuple);
+ /*
+ * While this is not necessary anymore after 297d627e, as a defense
+ * against C code that has not recompiled for minor releases after the
+ * fix, continue to expand the tuple.
+ */
+ if (HeapTupleHeaderGetNatts(tuple.t_data) < relation->rd_att->natts)
+ result = heap_expand_tuple(&tuple, relation->rd_att);
+ else
+ result = heap_copytuple(&tuple);
ReleaseBuffer(buffer);
return result;