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