velioglu/tmpfuncprop
Burak Velioglu 2022-02-09 16:46:52 +03:00
parent 6770b222d5
commit 9e938ba1a3
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
1 changed files with 4 additions and 3 deletions

View File

@ -1312,7 +1312,7 @@ PostprocessCreateFunctionStmt(Node *node, const char *queryString)
" non-distributed relations or sequences"), " non-distributed relations or sequences"),
errdetail("Function will be created only locally"), errdetail("Function will be created only locally"),
errhint("To distribute function, distribute dependent relations" errhint("To distribute function, distribute dependent relations"
" and sequences first"))); " and sequences first")));
return NIL; return NIL;
} }
@ -1325,15 +1325,16 @@ PostprocessCreateFunctionStmt(Node *node, const char *queryString)
return NodeDDLTaskList(NON_COORDINATOR_NODES, commands); return NodeDDLTaskList(NON_COORDINATOR_NODES, commands);
} }
/* /*
* FunctionDependsOnNonDistributedRelation checks whether the given function depends * FunctionDependsOnNonDistributedRelation checks whether the given function depends
* on non-distributed relation. * on non-distributed relation.
*/ */
bool bool
FunctionDependsOnNonDistributedRelation(ObjectAddress *functionAddress) FunctionDependsOnNonDistributedRelation(ObjectAddress *functionAddress)
{ {
Assert(getObjectClass(functionAddress) == OCLASS_PROC); Assert(getObjectClass(functionAddress) == OCLASS_PROC);
List *dependencies = GetDependenciesForObject(functionAddress); List *dependencies = GetDependenciesForObject(functionAddress);
ObjectAddress *dependency = NULL; ObjectAddress *dependency = NULL;
foreach_ptr(dependency, dependencies) foreach_ptr(dependency, dependencies)