Re: pltcl bug in 7.2? - Mailing list pgsql-general

From Tom Lane
Subject Re: pltcl bug in 7.2?
Date
Msg-id 27903.1019226736@sss.pgh.pa.us
Whole thread Raw
In response to pltcl bug in 7.2?  (Yury Don <yura@vpcit.ru>)
Responses Re: pltcl bug in 7.2?
Re: pltcl bug in 7.2?
Re: pltcl bug in 7.2?
List pgsql-general
Yury Don <yura@vpcit.ru> writes:
> Hello All,
> We have a database with koi8-r encoding, tables and fields names
> mostly in russian, and we have a trigger function on pltcl. With postgresql 7.1 everything
> worked well, but in 7.2 we are getting an error "utf_to_local: could
> not convert UTF-8" in the following construction
> foreach field [array names NEW] {
>   if {[info exists OLD(${field})]} ....

Hmm.  Someone added code in 7.2 to support conversion between the
database's encoding (whatever you specified with -E) and the UTF-8
encoding that Tcl wants to use all the time.  Sounds like you've
found a bug in that code.

> Also this error occures in any calling of NEW or OLD, for example
> [array get NEW] also raises those error.

Do you see it *only* in references to NEW/OLD?  Can you pass the
same data in normal parameters to a Tcl function?

            regards, tom lane

pgsql-general by date:

Previous
From: mixo
Date:
Subject: benchmarking
Next
From: Darren Ferguson
Date:
Subject: Re: pltcl bug in 7.2?