pg_locale (Was: Re: Problem with setlocale (found in libecpg)...)

Поиск
Список
Период
Сортировка
От Karel Zak
Тема pg_locale (Was: Re: Problem with setlocale (found in libecpg)...)
Дата
Msg-id 20010927121115.E31778@zf.jcu.cz
обсуждение исходный текст
Ответ на Re: Problem with setlocale (found in libecpg) [accessing a  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_locale (Was: Re: Problem with setlocale (found in libecpg)...)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
On Thu, Sep 27, 2001 at 12:08:29AM -0400, Tom Lane wrote:
> >> 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?

 The patch is attached. Now it's independent on glibc's game of setlocale()
results and free/strdup. It works for me...

 Thanks to Christof!

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Вложения

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

Предыдущее
От: Karel Zak
Дата:
Сообщение: Re: Problem with setlocale (found in libecpg) [accessing a
Следующее
От: "Vianen, Jeroen van"
Дата:
Сообщение: Fix for broken JDBC's getColumn() (take 2)