Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal support
От | Tom Lane |
---|---|
Тема | Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal support |
Дата | |
Msg-id | 5955.998586992@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal support (Vsevolod Lobko <seva@sevasoft.kiev.ua>) |
Ответы |
Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal
support
Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal support Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal support |
Список | pgsql-patches |
Vsevolod Lobko <seva@sevasoft.kiev.ua> writes: > This patch adds calls to Tcl_ExternalToUtf and Tcl_UtfToExternal > functions on parameters of SPI functions. I hate to say it, but this is an amazingly ugly patch. Can't you do it without so many #ifdefs and duplicating a lot of code? Think of the next guy who has to look at/work on this code. Possibly a macro that invokes Tcl_ExternalToUtfDString or does nothing might help. > Patch assumes that database encoding and system encoding of Tcl is > equal. Hmm, is that a tenable assumption? I don't know, I'm just asking. > It adds new configure switch > --enable-pltcl-utf. Without this switch patch does nothing. This is not a good approach, since it relies on the user to know whether he needs to do this or not. Seems like looking at the Tcl version number would be more appropriate: if version >= 8.3 then make these changes. You could do that in the code, without any configure patch, using #if's on TCL_MAJOR_VERSION and TCL_MINOR_VERSION (see libpgtcl for examples). regards, tom lane
В списке pgsql-patches по дате отправления: