Skip to content

Commit 5d825d7

Browse files
committed
Fix function name in error hint
pg_read_file() is the function that's in core, pg_file_read() is in adminpack. But when using pg_file_read() in adminpack it calls the *C* level function pg_read_file() in core, which probably threw the original author off. But the error hint should be about the SQL function. Reported-By: Sergei Kornilov Backpatch-through: 11 Discussion: https://postgr.es/m/373021616060475@mail.yandex.ru
1 parent 217815c commit 5d825d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/genfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pg_read_file(PG_FUNCTION_ARGS)
246246
ereport(ERROR,
247247
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
248248
(errmsg("must be superuser to read files with adminpack 1.0"),
249-
errhint("Consider using pg_file_read(), which is part of core, instead."))));
249+
errhint("Consider using pg_read_file(), which is part of core, instead."))));
250250

251251
/* handle optional arguments */
252252
if (PG_NARGS() >= 3)

0 commit comments

Comments
 (0)