pl/tcl Unicode conversion doesn't actually work?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pl/tcl Unicode conversion doesn't actually work?
Дата
Msg-id 8886.1456875673@sss.pgh.pa.us
обсуждение исходный текст
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: TAP / recovery-test fs-level backups, psql enhancements etc
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: The plan for FDW-based sharding