From a7c2c6434d522fa2ab7d3e9653dbb4d224cf579b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 24 May 2002 21:04:34 +0000 Subject: [PATCH] Fix coding error in UTF conversion. --- src/pl/tcl/pltcl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index f477c7f22c..686a59f003 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -594,15 +594,17 @@ pltcl_func_handler(PG_FUNCTION_ARGS) if (SPI_finish() != SPI_OK_FINISH) elog(ERROR, "pltcl: SPI_finish() failed"); - UTF_BEGIN; if (fcinfo->isnull) retval = (Datum) 0; else + { + UTF_BEGIN; retval = FunctionCall3(&prodesc->result_in_func, PointerGetDatum(UTF_U2E(interp->result)), ObjectIdGetDatum(prodesc->result_in_elem), Int32GetDatum(-1)); - UTF_END; + UTF_END; + } /************************************************************ * Finally we may restore normal error handling. -- 2.39.5