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

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy