Commit 4669cacb authored by Alvaro Herrera's avatar Alvaro Herrera

Rework HeapTupleHeader macros to reuse itemptr.h

The original definitions pointlessly disregarded existing ItemPointer
macros that do the same thing.
Reported-by: default avatarMichael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20210222201557.GA32655@alvherre.pgsql
parent a24ae3d7
...@@ -443,11 +443,10 @@ do { \ ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment