]> granicus.if.org Git - postgresql/commitdiff
Make error message of pageinspect more consistent for raw page inputs
authorMichael Paquier <michael@paquier.xyz>
Sun, 29 Jul 2018 14:50:35 +0000 (23:50 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 29 Jul 2018 14:50:35 +0000 (23:50 +0900)
There is a copy-paste error from bt_page_items() which got into
bt_page_items_bytea().  A second message in get_raw_page_internal() was
inconsistent with all the other sub-modules.

Author: Ashutosh Sharma
Discussion: https://postgr.es/m/CAE9k0PnZuZ3PVXSyQY91-53E8JKFcaSyknFqqU43r9MabKSYZA@mail.gmail.com

contrib/pageinspect/btreefuncs.c
contrib/pageinspect/rawpage.c

index 90acf6a4b6db98f60893d894ab7099edd62b2fcf..184ac62255c42da33b143d5f1e4add3dad28d3da 100644 (file)
@@ -429,7 +429,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
        if (!superuser())
                ereport(ERROR,
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-                                (errmsg("must be superuser to use pageinspect functions"))));
+                                (errmsg("must be superuser to use raw page functions"))));
 
        if (SRF_IS_FIRSTCALL())
        {
index d7bf782ccd5703fe082f42cef5d371ce597811da..39c50f487451509156ac88b0dc92877c817a4b39 100644 (file)
@@ -102,7 +102,7 @@ get_raw_page_internal(text *relname, ForkNumber forknum, BlockNumber blkno)
        if (!superuser())
                ereport(ERROR,
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-                                (errmsg("must be superuser to use raw functions"))));
+                                (errmsg("must be superuser to use raw page functions"))));
 
        relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
        rel = relation_openrv(relrv, AccessShareLock);