Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4669cac

Browse files
committed
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]
1 parent a24ae3d commit 4669cac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/include/access/htup_details.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,10 @@ do { \
443443
)
444444

445445
#define HeapTupleHeaderIndicatesMovedPartitions(tup) \
446-
(ItemPointerGetOffsetNumber(&(tup)->t_ctid) == MovedPartitionsOffsetNumber && \
447-
ItemPointerGetBlockNumberNoCheck(&(tup)->t_ctid) == MovedPartitionsBlockNumber)
446+
ItemPointerIndicatesMovedPartitions(&(tup)->t_ctid)
448447

449448
#define HeapTupleHeaderSetMovedPartitions(tup) \
450-
ItemPointerSet(&(tup)->t_ctid, MovedPartitionsBlockNumber, MovedPartitionsOffsetNumber)
449+
ItemPointerSetMovedPartitions(&(tup)->t_ctid)
451450

452451
#define HeapTupleHeaderGetDatumLength(tup) \
453452
VARSIZE(tup)

0 commit comments

Comments
 (0)