1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Rework HeapTupleHeader macros to reuse itemptr.h

The original definitions pointlessly disregarded existing ItemPointer
macros that do the same thing.

Reported-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20210222201557.GA32655@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2021-02-22 17:21:22 -03:00
parent a24ae3d7b9
commit 4669cacbd4

View File

@ -443,11 +443,10 @@ do { \
) )
#define HeapTupleHeaderIndicatesMovedPartitions(tup) \ #define HeapTupleHeaderIndicatesMovedPartitions(tup) \
(ItemPointerGetOffsetNumber(&(tup)->t_ctid) == MovedPartitionsOffsetNumber && \ ItemPointerIndicatesMovedPartitions(&(tup)->t_ctid)
ItemPointerGetBlockNumberNoCheck(&(tup)->t_ctid) == MovedPartitionsBlockNumber)
#define HeapTupleHeaderSetMovedPartitions(tup) \ #define HeapTupleHeaderSetMovedPartitions(tup) \
ItemPointerSet(&(tup)->t_ctid, MovedPartitionsBlockNumber, MovedPartitionsOffsetNumber) ItemPointerSetMovedPartitions(&(tup)->t_ctid)
#define HeapTupleHeaderGetDatumLength(tup) \ #define HeapTupleHeaderGetDatumLength(tup) \
VARSIZE(tup) VARSIZE(tup)