Re: Remaining dependency on setlocale()

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Remaining dependency on setlocale()
Дата
Msg-id a1a184524e11bb4dc8092353a02672cc42a05233.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Remaining dependency on setlocale()  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: Remaining dependency on setlocale()
Список pgsql-hackers
On Fri, 2025-10-31 at 15:01 +0100, Daniel Verite wrote:
> > Extensions often need to be updated for a new major version.
>
> I think forcing the C locale is not comparable to API changes,
> and the consequences are not even necessarily fixable for extensions.

Are we in agreement that it's fine for C extensions?

> For instance, consider the following function, when run in a database
> with en_US.utf8 as locale.
>
> CREATE FUNCTION lt_test(text,text) RETURNS boolean as $$
>  use locale; return ($_[0] lt $_[1])?1:0;
> $$ LANGUAGE plperlu;
>
> select lt_test('a', 'B');

Are you aware of PL code that does things like that? If the database
locale is ICU, that would be at least a little bit confusing.

Regards,
    Jeff Davis




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