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:
@ -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)
|
||||||
|
Reference in New Issue
Block a user