diff options
Diffstat (limited to 'src/pl/tcl/pltcl.c')
-rw-r--r-- | src/pl/tcl/pltcl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 3b1454f8335..bfbf62305c3 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -587,6 +587,7 @@ pltcl_fetch_interp(Oid prolang, bool pltrusted) static void call_pltcl_start_proc(Oid prolang, bool pltrusted) { + LOCAL_FCINFO(fcinfo, 0); char *start_proc; const char *gucname; ErrorContextCallback errcallback; @@ -597,7 +598,6 @@ call_pltcl_start_proc(Oid prolang, bool pltrusted) Form_pg_proc procStruct; AclResult aclresult; FmgrInfo finfo; - FunctionCallInfoData fcinfo; PgStat_FunctionCallUsage fcusage; /* select appropriate GUC */ @@ -658,11 +658,11 @@ call_pltcl_start_proc(Oid prolang, bool pltrusted) */ InvokeFunctionExecuteHook(procOid); fmgr_info(procOid, &finfo); - InitFunctionCallInfoData(fcinfo, &finfo, + InitFunctionCallInfoData(*fcinfo, &finfo, 0, InvalidOid, NULL, NULL); - pgstat_init_function_usage(&fcinfo, &fcusage); - (void) FunctionCallInvoke(&fcinfo); + pgstat_init_function_usage(fcinfo, &fcusage); + (void) FunctionCallInvoke(fcinfo); pgstat_end_function_usage(&fcusage, true); /* Pop the error context stack */ @@ -869,7 +869,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, /************************************************** * For tuple values, add a list for 'array set ...' **************************************************/ - if (fcinfo->argnull[i]) + if (fcinfo->args[i].isnull) Tcl_ListObjAppendElement(NULL, tcl_cmd, Tcl_NewObj()); else { @@ -880,7 +880,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, HeapTupleData tmptup; Tcl_Obj *list_tmp; - td = DatumGetHeapTupleHeader(fcinfo->arg[i]); + td = DatumGetHeapTupleHeader(fcinfo->args[i].value); /* Extract rowtype info and find a tupdesc */ tupType = HeapTupleHeaderGetTypeId(td); tupTypmod = HeapTupleHeaderGetTypMod(td); @@ -901,14 +901,14 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state, * Single values are added as string element * of their external representation **************************************************/ - if (fcinfo->argnull[i]) + if (fcinfo->args[i].isnull) Tcl_ListObjAppendElement(NULL, tcl_cmd, Tcl_NewObj()); else { char *tmp; tmp = OutputFunctionCall(&prodesc->arg_out_func[i], - fcinfo->arg[i]); + fcinfo->args[i].value); UTF_BEGIN; Tcl_ListObjAppendElement(NULL, tcl_cmd, Tcl_NewStringObj(UTF_E2U(tmp), -1)); |