------------------------------------ * 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. */
| 474 | * these functions could be called by any user. |
| 475 | */ |
| 476 | Datum |
| 477 | pg_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 |
nothing calls this directly
no test coverage detected