diff --git a/src/backend/distributed/commands/function.c b/src/backend/distributed/commands/function.c index 13ec391d2..1296d3e24 100644 --- a/src/backend/distributed/commands/function.c +++ b/src/backend/distributed/commands/function.c @@ -1328,6 +1328,12 @@ CreateFunctionStmtObjectAddress(Node *node, bool missing_ok) FunctionParameter *funcParam = NULL; foreach_ptr(funcParam, stmt->parameters) { + if (funcParam->mode == FUNC_PARAM_TABLE) + { + /* RETURN TABLE parameters should not be included in the args list */ + continue; + } + objectWithArgs->objargs = lappend(objectWithArgs->objargs, funcParam->argType); }