Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal - Mailing list pgsql-patches

From Reinhard Max
Subject Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal
Date
Msg-id Pine.LNX.4.33.0109061712350.20161-100000@wotan.suse.de
Whole thread Raw
Responses Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Thu, 6 Sep 2001, Tom Lane wrote:

> Vsevolod Lobko <seva@sevasoft.kiev.ua> writes:
> > Can somebody add tcl version checking to configure.in so we can do
> > that all on configure stage?
>
> > ok, for now I do it at compile time, based on TCL_MAJOR_VERSION &
> > TCL_MINOR_VERSION
>
> I think a compile-time #if on TCL_MAJOR_VERSION is the right thing to
> do.  configure couldn't do any more than that for you, anyway.

TCL_MAJOR_VERSION is not enough, because the UTF internal
representation was introduced between 8.0 and 8.1.

A compile-time #if is OK for PL/Tcl, as it get's linked against a
specific version of libtcl anyway. But for PgTcl it needs to be
detected at runtime, because you don't know what version of Tcl in
gets pulled into.

> Also, a runtime test will not work since if you are on an older
> version, the calls to the UTF routines will fail to link.

The current proposal is to use PostgreSQL's UTF conversion routines
for PL/Tcl and UNICODE as client encoding for PgTcl so Tcl's UTF
routines will not be needed. See the previous mails from me and
Vsevolod for details.

cu
    Rinhard




pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libpgtcl.dll
Next
From: Tom Lane
Date:
Subject: Re: Patch for pl/tcl Tcl_ExternalToUtf and Tcl_UtfToExternal