| 1147 | } |
| 1148 | |
| 1149 | Datum |
| 1150 | FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2) |
| 1151 | { |
| 1152 | LOCAL_FCINFO(fcinfo, 2); |
| 1153 | Datum result; |
| 1154 | |
| 1155 | InitFunctionCallInfoData(*fcinfo, flinfo, 2, collation, NULL, NULL); |
| 1156 | |
| 1157 | fcinfo->args[0].value = arg1; |
| 1158 | fcinfo->args[0].isnull = false; |
| 1159 | fcinfo->args[1].value = arg2; |
| 1160 | fcinfo->args[1].isnull = false; |
| 1161 | |
| 1162 | result = FunctionCallInvoke(fcinfo); |
| 1163 | |
| 1164 | /* Check for null result, since caller is clearly not expecting one */ |
| 1165 | if (fcinfo->isnull) |
| 1166 | elog(ERROR, "function %u returned NULL", flinfo->fn_oid); |
| 1167 | |
| 1168 | return result; |
| 1169 | } |
| 1170 | |
| 1171 | Datum |
| 1172 | FunctionCall3Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, |
no outgoing calls
no test coverage detected