mirror of https://github.com/citusdata/citus.git
Check schema ownership in worker_merge_* functions
parent
e9a7295ead
commit
c4ad899dd8
|
@ -103,6 +103,12 @@ worker_merge_files_into_table(PG_FUNCTION_ARGS)
|
||||||
resetStringInfo(jobSchemaName);
|
resetStringInfo(jobSchemaName);
|
||||||
appendStringInfoString(jobSchemaName, "public");
|
appendStringInfoString(jobSchemaName, "public");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Oid schemaId = get_namespace_oid(jobSchemaName->data, false);
|
||||||
|
|
||||||
|
EnsureSchemaOwner(schemaId);
|
||||||
|
}
|
||||||
|
|
||||||
/* create the task table and copy files into the table */
|
/* create the task table and copy files into the table */
|
||||||
columnNameList = ArrayObjectToCStringList(columnNameObject);
|
columnNameList = ArrayObjectToCStringList(columnNameObject);
|
||||||
|
@ -172,6 +178,12 @@ worker_merge_files_and_run_query(PG_FUNCTION_ARGS)
|
||||||
resetStringInfo(jobSchemaName);
|
resetStringInfo(jobSchemaName);
|
||||||
appendStringInfoString(jobSchemaName, "public");
|
appendStringInfoString(jobSchemaName, "public");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Oid schemaId = get_namespace_oid(jobSchemaName->data, false);
|
||||||
|
|
||||||
|
EnsureSchemaOwner(schemaId);
|
||||||
|
}
|
||||||
|
|
||||||
appendStringInfo(setSearchPathString, SET_SEARCH_PATH_COMMAND, jobSchemaName->data);
|
appendStringInfo(setSearchPathString, SET_SEARCH_PATH_COMMAND, jobSchemaName->data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue