From 4669cacbd4b4b1baa1b7f2ea53d461433a1b6276 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 22 Feb 2021 17:21:22 -0300 Subject: [PATCH] Rework HeapTupleHeader macros to reuse itemptr.h The original definitions pointlessly disregarded existing ItemPointer macros that do the same thing. Reported-by: Michael Paquier Discussion: https://postgr.es/m/20210222201557.GA32655@alvherre.pgsql --- src/include/access/htup_details.h | 5 ++--- 1 file 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)