From: Michael Paquier Date: Sun, 29 Jul 2018 14:50:35 +0000 (+0900) Subject: Make error message of pageinspect more consistent for raw page inputs X-Git-Tag: REL_12_BETA1~1802 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59eb12c9c5a5aa980ed89363d143edad712d2c1d;p=postgresql Make error message of pageinspect more consistent for raw page inputs 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 --- diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c index 90acf6a4b6..184ac62255 100644 --- a/contrib/pageinspect/btreefuncs.c +++ b/contrib/pageinspect/btreefuncs.c @@ -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()) { diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c index d7bf782ccd..39c50f4874 100644 --- a/contrib/pageinspect/rawpage.c +++ b/contrib/pageinspect/rawpage.c @@ -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);