Michael Meskes wrote: > On Thu, Sep 27, 2001 at 12:08:29AM -0400, Tom Lane wrote: > > I looked around, and am worried about the behavior of PGLC_current() > > in src/backend/utils/adt/pg_locale.c. It doesn't change locale but > > does retrieve several successive setlocale() results. Does that work > > in glibc? > > I haven't experienced any problem so far, but then I wasn't able to > reproduce Christof's either on my glibc2.2 system.
You have to link with efence to see it (see below). (BTW the bug is in libecpg) Otherwise the bug is hidden (setting an illegal locale simply does not do anything if we ignore it's return value (setlocale returns NULL on error)). Perhaps outputting a notice to the debug stream if setlocale fails is a good choice (I don't like to raise a SQL error). Christof [More detailed: if the former value is freed, the pointer still points to a valid memory region (without efence), further processing inside ecpg will reuse that region for just another string (an input variable's value in SQL notation). So setting locale '0' or 'ISO' or 'some string' silently fails.] ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly