aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-05-24 21:04:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-05-24 21:04:34 +0000
commit6e675d278ae892f5368b12cf872a42ef9987ad23 (patch)
tree278ee8324c890271590efe9f57f5beda434d5ba9 /src
parent07be59805b5127f9a70a333747b8d25faed72711 (diff)
downloadpostgresql-6e675d278ae892f5368b12cf872a42ef9987ad23.tar.gz
postgresql-6e675d278ae892f5368b12cf872a42ef9987ad23.zip
Fix coding error in UTF conversion.
Diffstat (limited to 'src')
-rw-r--r--src/pl/tcl/pltcl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index a6c508c5790..ba17dc52b96 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.54 2002/05/24 19:58:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.55 2002/05/24 21:04:34 tgl Exp $
*
**********************************************************************/
@@ -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.