Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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 <michael@paquier.xyz> Discussion: https://postgr.es/m/20210222201557.GA32655@alvherre.pgsql
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

+2-3
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)