mirror of https://github.com/citusdata/citus.git
Require superuser when using non-existent job schema in worker_merge_files_into_table
parent
c4ad899dd8
commit
e8e956aa9f
|
@ -100,6 +100,17 @@ worker_merge_files_into_table(PG_FUNCTION_ARGS)
|
||||||
schemaExists = JobSchemaExists(jobSchemaName);
|
schemaExists = JobSchemaExists(jobSchemaName);
|
||||||
if (!schemaExists)
|
if (!schemaExists)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* For testing purposes, we allow merging into a table in the public schema,
|
||||||
|
* but only when running as superuser.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!superuser())
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("job schema does not exist"),
|
||||||
|
errdetail("must be superuser to use public schema")));
|
||||||
|
}
|
||||||
|
|
||||||
resetStringInfo(jobSchemaName);
|
resetStringInfo(jobSchemaName);
|
||||||
appendStringInfoString(jobSchemaName, "public");
|
appendStringInfoString(jobSchemaName, "public");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue