Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)
Дата
Msg-id 6030.1136826393@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)  (Andrew Dunstan <andrew@dunslane.net>)
Re: plperl vs LC_COLLATE (was Re: Possible savepoint bug)  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I don't know. Reading that code just makes my head spin ...

Yeah, too many ifdefs :-(.  But I suppose that the initial
"#ifdef LOCALE_ENVIRON_REQUIRED" block is not compiled on sane
platforms, meaning that the first code in the routine is the
unconditional   if (! setlocale(LC_ALL, ""))setlocale_failure = TRUE;

> I should have thought a library shouldn't make too many assumptions
> about locale settings anyway.

Indeed; I think a pretty strong case can be made that this is a Perl
bug.  It's reasonable to be doing the setlocale call in a standalone
Perl executable, but libperl should just work with whatever locale
settings have been chosen by the surrounding program (ie, all these
calls should be setlocale(LC_xxx, NULL) in the libperl case).

> I'm just about out of ideas and right out of time to spend on this.

We could just file a Perl bug report and wait for them to fix it.
        regards, tom lane


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

Предыдущее
От: "Jim Buttafuoco"
Дата:
Сообщение: Re: Fw: Is anyone interested in getting PostgreSQL working
Следующее
От: Neil Conway
Дата:
Сообщение: Re: lookup_rowtype_tupdesc considered harmful