velioglu/tmpfuncprop
Burak Velioglu 2022-02-14 12:18:24 +03:00
parent ad089f3dbb
commit 9574ebc988
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
2 changed files with 6 additions and 5 deletions

View File

@ -83,6 +83,7 @@ static void EnsureSequentialModeForFunctionDDL(void);
static bool ShouldPropagateCreateFunction(CreateFunctionStmt *stmt);
static bool ShouldPropagateAlterFunction(const ObjectAddress *address);
static bool ShouldAddFunctionSignature(FunctionParameterMode mode);
static bool DependentRelationsOfFunctionCanBeDistributed(ObjectAddress *functionAddress);
static ObjectAddress FunctionToObjectAddress(ObjectType objectType,
ObjectWithArgs *objectWithArgs,
bool missing_ok);
@ -1310,9 +1311,10 @@ PreprocessCreateFunctionStmt(Node *node, const char *queryString,
* PostprocessCreateFunctionStmt actually creates the plan we need to execute for function
* propagation. This is the downside of using pg_get_functiondef to get the sql statement.
*
* If function depends on any non-distributed table or sequence, Citus can not distribute
* it. In order to not to prevent users from creating local functions on the coordinator
* WARNING message will be sent to the customer about the case instead of erroring out.
* If function depends on any non-distributed relation (except sequence and composite type),
* Citus can not distribute it. In order to not to prevent users from creating local
* functions on the coordinator WARNING message will be sent to the customer about the case
* instead of erroring out.
*
* Besides creating the plan we also make sure all (new) dependencies of the function are
* created on all nodes.
@ -1352,7 +1354,7 @@ PostprocessCreateFunctionStmt(Node *node, const char *queryString)
* DependentRelationsOfFunctionCanBeDistributed checks whether Citus can distribute
* dependent relations of the given function.
*/
bool
static bool
DependentRelationsOfFunctionCanBeDistributed(ObjectAddress *functionAddress)
{
Assert(getObjectClass(functionAddress) == OCLASS_PROC);

View File

@ -259,7 +259,6 @@ extern List * PreprocessCreateFunctionStmt(Node *stmt, const char *queryString,
ProcessUtilityContext processUtilityContext);
extern List * PostprocessCreateFunctionStmt(Node *stmt,
const char *queryString);
extern bool DependentRelationsOfFunctionCanBeDistributed(ObjectAddress *functionAddress);
extern ObjectAddress CreateFunctionStmtObjectAddress(Node *stmt,
bool missing_ok);
extern ObjectAddress DefineAggregateStmtObjectAddress(Node *stmt,