diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-04-01 13:24:50 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-04-01 13:24:50 +0900 |
commit | d16773cdc86210493a2874cb0cf93f3883fcda73 (patch) | |
tree | 24306ded63bd036dc2eb37be6f817048c986eccd /contrib/pgstattuple/pgstattuple.c | |
parent | 73db8f4d17ed4efb7709f1cafd5b1dd0285b0842 (diff) |
Add macros in hash and btree AMs to get the special area of their pages
This makes the code more consistent with SpGiST, GiST and GIN, that
already use this style, and the idea is to make easier the introduction
of more sanity checks for each of these AM-specific macros. BRIN uses a
different set of macros to get a page's type and flags, so it has no
need for something similar.
Author: Matthias van de Meent
Discussion: https://postgr.es/m/CAEze2WjE3+tGO9Fs9+iZMU+z6mMZKo54W1Zt98WKqbEUHbHOBg@mail.gmail.com
Diffstat (limited to 'contrib/pgstattuple/pgstattuple.c')
-rw-r--r-- | contrib/pgstattuple/pgstattuple.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index c9b8f01f9b4..30945669081 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -415,7 +415,7 @@ pgstat_btree_page(pgstattuple_type *stat, Relation rel, BlockNumber blkno, { BTPageOpaque opaque; - opaque = (BTPageOpaque) PageGetSpecialPointer(page); + opaque = BTPageGetOpaque(page); if (P_IGNORE(opaque)) { /* deleted or half-dead page */ @@ -452,7 +452,7 @@ pgstat_hash_page(pgstattuple_type *stat, Relation rel, BlockNumber blkno, { HashPageOpaque opaque; - opaque = (HashPageOpaque) PageGetSpecialPointer(page); + opaque = HashPageGetOpaque(page); switch (opaque->hasho_flag & LH_PAGE_TYPE) { case LH_UNUSED_PAGE: |