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
This commit is contained in:
Michael Paquier 2018-07-29 23:50:35 +09:00
parent 9f7ba88aa4
commit 59eb12c9c5
2 changed files with 2 additions and 2 deletions

View 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())
{

View 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);