Re: Move defaults toward ICU in 16?

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Move defaults toward ICU in 16?
Дата
Msg-id 337d581bae5d6253919f70acdfc184631f0ad41b.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Move defaults toward ICU in 16?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Move defaults toward ICU in 16?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, 2023-02-02 at 18:10 -0500, Tom Lane wrote:
> Yeah.  I would be resistant to making ICU a required dependency,
> but it doesn't seem unreasonable to start moving towards it being
> our default collation support.

Patch attached.

To get the default locale, the patch initializes a UCollator with NULL
for the locale name, and then queries it for the locale name. Then it's
converted to a language tag, which is consistent with the initial
collation import. I'm not sure that's the best way, but it seems
reasonable.

If it's a user-provided locale (--icu-locale=), then the patch leaves
it as-is, and does not convert it to a language tag (consistent with
CREATE COLLATION and CREATE DATABASE).

I opened another discussion about whether we want to try harder to
validate or canonicalize the locale name:

https://www.postgresql.org/message-id/11b1eeb7e7667fdd4178497aeb796c48d26e69b9.camel@j-davis.com

--
Jeff Davis
PostgreSQL Contributor Team - AWS



Вложения

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

Предыдущее
От: "Bagga, Rishu"
Дата:
Сообщение: Re: SLRUs in the main buffer pool - Page Header definitions
Следующее
От: Andres Freund
Дата:
Сообщение: Re: SLRUs in the main buffer pool - Page Header definitions