1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[].

This requires changing quite a few places that were depending on
sizeof(HeapTupleHeaderData), but it seems for the best.

Michael Paquier, some adjustments by me
This commit is contained in:
Tom Lane
2015-02-21 15:13:06 -05:00
parent 3d9b6f31ee
commit e1a11d9311
19 changed files with 102 additions and 99 deletions

View File

@ -84,9 +84,9 @@ suppress_redundant_updates_trigger(PG_FUNCTION_ARGS)
HeapTupleHeaderGetNatts(oldheader)) &&
((newheader->t_infomask & ~HEAP_XACT_MASK) ==
(oldheader->t_infomask & ~HEAP_XACT_MASK)) &&
memcmp(((char *) newheader) + offsetof(HeapTupleHeaderData, t_bits),
((char *) oldheader) + offsetof(HeapTupleHeaderData, t_bits),
newtuple->t_len - offsetof(HeapTupleHeaderData, t_bits)) == 0)
memcmp(((char *) newheader) + SizeofHeapTupleHeader,
((char *) oldheader) + SizeofHeapTupleHeader,
newtuple->t_len - SizeofHeapTupleHeader) == 0)
{
/* ... then suppress the update */
rettuple = NULL;