aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/spi.c')
-rw-r--r--src/backend/executor/spi.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 70c03e0f605..d898f4ca78d 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -2387,20 +2387,9 @@ _SPI_convert_params(int nargs, Oid *argtypes,
if (nargs > 0)
{
- int i;
-
- 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;
-
- for (i = 0; i < nargs; i++)
+ paramLI = makeParamList(nargs);
+
+ for (int i = 0; i < nargs; i++)
{
ParamExternData *prm = &paramLI->params[i];