@@ -146,7 +146,6 @@ typedef struct pltcl_proc_desc
146146Oid result_typid ;/* OID of fn's result type */
147147FmgrInfo result_in_func ;/* input function for fn's result type */
148148Oid result_typioparam ;/* param to pass to same */
149- bool fn_is_procedure ;/* true if this is a procedure */
150149bool fn_retisset ;/* true if function returns a set */
151150bool fn_retistuple ;/* true if function returns composite */
152151bool fn_retisdomain ;/* true if function returns domain */
@@ -982,7 +981,7 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
982981retval = (Datum )0 ;
983982fcinfo -> isnull = true;
984983}
985- else if (fcinfo -> isnull && ! prodesc -> fn_is_procedure )
984+ else if (fcinfo -> isnull )
986985{
987986retval = InputFunctionCall (& prodesc -> result_in_func ,
988987NULL ,
@@ -1040,13 +1039,11 @@ pltcl_func_handler(PG_FUNCTION_ARGS, pltcl_call_state *call_state,
10401039call_state );
10411040retval = HeapTupleGetDatum (tup );
10421041}
1043- else if (! prodesc -> fn_is_procedure )
1042+ else
10441043retval = InputFunctionCall (& prodesc -> result_in_func ,
10451044utf_u2e (Tcl_GetStringResult (interp )),
10461045prodesc -> result_typioparam ,
10471046-1 );
1048- else
1049- retval = 0 ;
10501047
10511048return retval ;
10521049}
@@ -1523,9 +1520,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid,
15231520 * Get the required information for input conversion of the
15241521 * return value.
15251522 ************************************************************/
1526- prodesc -> fn_is_procedure = (procStruct -> prokind == PROKIND_PROCEDURE );
1527-
1528- if (!is_trigger && !is_event_trigger && !prodesc -> fn_is_procedure )
1523+ if (!is_trigger && !is_event_trigger )
15291524{
15301525Oid rettype = procStruct -> prorettype ;
15311526
@@ -2218,7 +2213,7 @@ pltcl_returnnext(ClientData cdata, Tcl_Interp *interp,
22182213tuplestore_puttuple (call_state -> tuple_store ,tuple );
22192214}
22202215}
2221- else if (! prodesc -> fn_is_procedure )
2216+ else
22222217{
22232218Datum retval ;
22242219bool isNull = false;