Build ParamListInfo array representing current arguments */
| 1070 | |
| 1071 | /* Build ParamListInfo array representing current arguments */ |
| 1072 | static void |
| 1073 | postquel_sub_params(SQLFunctionCachePtr fcache, |
| 1074 | FunctionCallInfo fcinfo) |
| 1075 | { |
| 1076 | int nargs = fcinfo->nargs; |
| 1077 | |
| 1078 | if (nargs > 0) |
| 1079 | { |
| 1080 | ParamListInfo paramLI; |
| 1081 | |
| 1082 | if (fcache->paramLI == NULL) |
| 1083 | { |
| 1084 | paramLI = makeParamList(nargs); |
| 1085 | fcache->paramLI = paramLI; |
| 1086 | } |
| 1087 | else |
| 1088 | { |
| 1089 | paramLI = fcache->paramLI; |
| 1090 | Assert(paramLI->numParams == nargs); |
| 1091 | } |
| 1092 | |
| 1093 | for (int i = 0; i < nargs; i++) |
| 1094 | { |
| 1095 | ParamExternData *prm = ¶mLI->params[i]; |
| 1096 | |
| 1097 | prm->value = fcinfo->args[i].value; |
| 1098 | prm->isnull = fcinfo->args[i].isnull; |
| 1099 | prm->pflags = 0; |
| 1100 | prm->ptype = fcache->pinfo->argtypes[i]; |
| 1101 | } |
| 1102 | } |
| 1103 | else |
| 1104 | fcache->paramLI = NULL; |
| 1105 | } |
| 1106 | |
| 1107 | /* |
| 1108 | * Extract the SQL function's value from a single result row. This is used |
no test coverage detected