MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_logdir_ls

Function pg_logdir_ls

contrib/adminpack/adminpack.c:476–485  ·  view source on GitHub ↗

------------------------------------ * pg_logdir_ls - Old version * * The superuser() check here must be kept as the library might be upgraded * without the extension being upgraded, meaning that in pre-1.1 installations * these functions could be called by any user. */

Source from the content-addressed store, hash-verified

474 * these functions could be called by any user.
475 */
476Datum
477pg_logdir_ls(PG_FUNCTION_ARGS)
478{
479 if (!superuser())
480 ereport(ERROR,
481 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
482 errmsg("only superuser can list the log directory")));
483
484 return (pg_logdir_ls_internal(fcinfo));
485}
486
487/* ------------------------------------
488 * pg_logdir_ls_v1_1 - Version 1.1

Callers

nothing calls this directly

Calls 4

superuserFunction · 0.85
pg_logdir_ls_internalFunction · 0.70
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected