Re: Problem with setlocale (found in libecpg) [accessing a

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christof Petig <christof@petig-baender.de>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Michael Meskes <meskes@postgresql.org>, pgsql-patches@postgresql.org
Date: 2001-09-27T04:08:29Z
Lists: pgsql-hackers
>> Well at least on glibc-2.2 it seems that setlocale retuns a pointer to
>> malloced memory, and frees this pointer on subsequent calls to
>> setlocale.
>> So I would kindly ask you to take a second look at every invokation of
>> setlocale.

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?

			regards, tom lane