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

Function requireSuperuser

contrib/adminpack/adminpack.c:115–122  ·  view source on GitHub ↗

* check for superuser, bark if not. */

Source from the content-addressed store, hash-verified

113 * check for superuser, bark if not.
114 */
115static void
116requireSuperuser(void)
117{
118 if (!superuser())
119 ereport(ERROR,
120 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
121 errmsg("only superuser may access generic file functions")));
122}
123
124
125

Callers 3

pg_file_writeFunction · 0.70
pg_file_renameFunction · 0.70
pg_file_unlinkFunction · 0.70

Calls 3

superuserFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected