Re: localization problem (and solution)

Поиск
Список
Период
Сортировка
От Andreas Seltenreich
Тема Re: localization problem (and solution)
Дата
Msg-id 87wthzhqt7.fsf@gate450.dyndns.org
обсуждение исходный текст
Ответ на Re: localization problem (and solution)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: localization problem (and solution)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> I looked into this a bit more, and it seems the issue is that libperl
> will do
>     setlocale(LC_ALL, "");
> the first time any locale-related Perl function is invoked.  To defend
> ourselves against that, we'd have to set more environment variables than
> just LC_COLLATE and LC_CTYPE.
>
> What I'm thinking about is:
> * during startup, putenv("LC_ALL=C") and unsetenv any other LC_ variables
>   that may be lurking, except LC_MESSAGES.
> * copy LC_COLLATE and LC_CTYPE into the environment when we get them
>   from pg_control, as Manuel suggested.

I'm afraid having LC_ALL in the environment at this time would still
do the wrong thing on setlocale(LC_ALL, ""); since a LC_ALL
environment variable overrides the other categories. Maybe setting
LANG instead would be a better choice?

regards,
Andreas
-- 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: I am back online again
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: status of concurrent VACUUM patch ...