diff options
Diffstat (limited to 'src/backend/executor/functions.c')
-rw-r--r-- | src/backend/executor/functions.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index c6b7203f813..965e5dea70e 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -906,21 +906,10 @@ postquel_sub_params(SQLFunctionCachePtr fcache, if (nargs > 0) { ParamListInfo paramLI; - int i; if (fcache->paramLI == NULL) { - paramLI = (ParamListInfo) - palloc(offsetof(ParamListInfoData, params) + - nargs * sizeof(ParamExternData)); - /* we have static list of params, so no hooks needed */ - paramLI->paramFetch = NULL; - paramLI->paramFetchArg = NULL; - paramLI->paramCompile = NULL; - paramLI->paramCompileArg = NULL; - paramLI->parserSetup = NULL; - paramLI->parserSetupArg = NULL; - paramLI->numParams = nargs; + paramLI = makeParamList(nargs); fcache->paramLI = paramLI; } else @@ -929,7 +918,7 @@ postquel_sub_params(SQLFunctionCachePtr fcache, Assert(paramLI->numParams == nargs); } - for (i = 0; i < nargs; i++) + for (int i = 0; i < nargs; i++) { ParamExternData *prm = ¶mLI->params[i]; |