From d43085d12e825ede628bafee1e5e6e0e3a3d5e67 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 2 Apr 2022 11:27:20 +0900 Subject: pageinspect: Use better macros to get special page area for GIN and GiST These five code paths are the last ones that made use of PageGetSpecialPointer() to get the special area of such pages, while those index AMs have already macros to do this job. Noticed while reviewing the use PageGetSpecialPointer() in the whole tree, in relation to the recent commit d16773c. --- contrib/pageinspect/gistfuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/pageinspect/gistfuncs.c') diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c index 6bb81ffb840..b2bbf4f6cbc 100644 --- a/contrib/pageinspect/gistfuncs.c +++ b/contrib/pageinspect/gistfuncs.c @@ -64,7 +64,7 @@ gist_page_opaque_info(PG_FUNCTION_ARGS) (int) MAXALIGN(sizeof(GISTPageOpaqueData)), (int) PageGetSpecialSize(page)))); - opaq = (GISTPageOpaque) PageGetSpecialPointer(page); + opaq = GistPageGetOpaque(page); if (opaq->gist_page_id != GIST_PAGE_ID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), @@ -139,7 +139,7 @@ gist_page_items_bytea(PG_FUNCTION_ARGS) (int) MAXALIGN(sizeof(GISTPageOpaqueData)), (int) PageGetSpecialSize(page)))); - opaq = (GISTPageOpaque) PageGetSpecialPointer(page); + opaq = GistPageGetOpaque(page); if (opaq->gist_page_id != GIST_PAGE_ID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), -- cgit v1.2.3