Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 59eb12c

Browse files
committed
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
1 parent 9f7ba88 commit 59eb12c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/pageinspect/btreefuncs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
429429
if (!superuser())
430430
ereport(ERROR,
431431
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
432-
(errmsg("must be superuser to use pageinspect functions"))));
432+
(errmsg("must be superuser to use raw page functions"))));
433433

434434
if (SRF_IS_FIRSTCALL())
435435
{

contrib/pageinspect/rawpage.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ get_raw_page_internal(text *relname, ForkNumber forknum, BlockNumber blkno)
102102
if (!superuser())
103103
ereport(ERROR,
104104
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
105-
(errmsg("must be superuser to use raw functions"))));
105+
(errmsg("must be superuser to use raw page functions"))));
106106

107107
relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname));
108108
rel = relation_openrv(relrv, AccessShareLock);

0 commit comments

Comments
 (0)