diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-04-02 11:27:20 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-04-02 11:27:20 +0900 |
commit | d43085d12e825ede628bafee1e5e6e0e3a3d5e67 (patch) | |
tree | 54eb4704908b59573aa20f58540a376ac77766c8 /contrib/pageinspect/gistfuncs.c | |
parent | 465ab24296c27502c81c8c197725cba728b9b057 (diff) | |
download | postgresql-d43085d12e825ede628bafee1e5e6e0e3a3d5e67.tar.gz postgresql-d43085d12e825ede628bafee1e5e6e0e3a3d5e67.zip |
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.
Diffstat (limited to 'contrib/pageinspect/gistfuncs.c')
-rw-r--r-- | contrib/pageinspect/gistfuncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
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), |