From 90928cfd7437da093507fc7d57266470c5b1162d Mon Sep 17 00:00:00 2001 From: Ahmet Gedemenli Date: Fri, 10 Dec 2021 14:50:19 +0300 Subject: [PATCH] Do not include return table params in the function arg list --- src/backend/distributed/commands/function.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); }