summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2021-02-22 20:21:22 +0000
committerAlvaro Herrera2021-03-25 18:47:48 +0000
commit4669cacbd4b4b1baa1b7f2ea53d461433a1b6276 (patch)
treed336058cfc2555789d8ab2eb70322f220721f483
parenta24ae3d7b9efb3b113c0d53030aa99de0d41b40a (diff)
Rework HeapTupleHeader macros to reuse itemptr.h
The original definitions pointlessly disregarded existing ItemPointer macros that do the same thing. Reported-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/include/access/htup_details.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/access/htup_details.h b/src/include/access/htup_details.h
index 9a4f43c1ff..960772f76b 100644
--- a/src/include/access/htup_details.h
+++ b/src/include/access/htup_details.h
@@ -443,11 +443,10 @@ do { \
)
#define HeapTupleHeaderIndicatesMovedPartitions(tup) \
- (ItemPointerGetOffsetNumber(&(tup)->t_ctid) == MovedPartitionsOffsetNumber && \
- ItemPointerGetBlockNumberNoCheck(&(tup)->t_ctid) == MovedPartitionsBlockNumber)
+ ItemPointerIndicatesMovedPartitions(&(tup)->t_ctid)
#define HeapTupleHeaderSetMovedPartitions(tup) \
- ItemPointerSet(&(tup)->t_ctid, MovedPartitionsBlockNumber, MovedPartitionsOffsetNumber)
+ ItemPointerSetMovedPartitions(&(tup)->t_ctid)
#define HeapTupleHeaderGetDatumLength(tup) \
VARSIZE(tup)