From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | pl/tcl Unicode conversion doesn't actually work? |
Date: | 2016-03-01 23:41:13 |
Message-ID: | 8886.1456875673@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'd always sort of assumed that the UTF_U2E() / UTF_E2U() macros in
pltcl.c were enabled by default. I just realized that that isn't so:
they're enabled by a test
#if defined(UNICODE_CONVERSION) && HAVE_TCL_VERSION(8,1)
UNICODE_CONVERSION is defined nowhere in our sources, and I can find no
indication that the Tcl headers define it either. A quick test proves
that indeed no encoding conversion happens when running pltcl.
It looks like this has been broken since commit 034895125d648b86, which
is rather distressing because it means pretty much nobody is using pltcl
with any non-ASCII data. It also means that pltcl is a trivial way to
break encoding validity inside any non-UTF8 database.
If we're moving the minimum Tcl version to be 8.4, as I just proposed we
should do in another thread, I think we should remove the above-quoted #if
and just compile this code unconditionally.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2016-03-02 01:36:26 | Re: The plan for FDW-based sharding |
Previous Message | Alvaro Herrera | 2016-03-01 23:07:13 | Re: TAP / recovery-test fs-level backups, psql enhancements etc |