mirror of https://github.com/citusdata/citus.git
mark_aggregate_for_distributed_execution: EnsureSuperUser for AGGREGATION_STRATEGY_COMBINE
parent
8fe885b457
commit
9abe31e34d
|
@ -249,8 +249,6 @@ mark_aggregate_for_distributed_execution(PG_FUNCTION_ARGS)
|
||||||
"followed by a list of parameters in parantheses")));
|
"followed by a list of parameters in parantheses")));
|
||||||
}
|
}
|
||||||
|
|
||||||
EnsureFunctionOwner(funcOid);
|
|
||||||
|
|
||||||
if (!PG_ARGISNULL(1))
|
if (!PG_ARGISNULL(1))
|
||||||
{
|
{
|
||||||
char *strategyParam = TextDatumGetCString(PG_GETARG_TEXT_P(1));
|
char *strategyParam = TextDatumGetCString(PG_GETARG_TEXT_P(1));
|
||||||
|
@ -274,6 +272,15 @@ mark_aggregate_for_distributed_execution(PG_FUNCTION_ARGS)
|
||||||
"mark_aggregate_for_distributed_execution expects a strategy that is one of: 'none', 'combine', 'commute'");
|
"mark_aggregate_for_distributed_execution expects a strategy that is one of: 'none', 'combine', 'commute'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (aggregationStrategy == AGGREGATION_STRATEGY_COMBINE)
|
||||||
|
{
|
||||||
|
EnsureSuperUser();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnsureFunctionOwner(funcOid);
|
||||||
|
}
|
||||||
|
|
||||||
if (aggregationStrategy == AGGREGATION_STRATEGY_COMBINE)
|
if (aggregationStrategy == AGGREGATION_STRATEGY_COMBINE)
|
||||||
{
|
{
|
||||||
proctup = SearchSysCache1(PROCOID, funcOid);
|
proctup = SearchSysCache1(PROCOID, funcOid);
|
||||||
|
|
Loading…
Reference in New Issue