Re: [17] CREATE COLLATION default provider

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: [17] CREATE COLLATION default provider
Дата
Msg-id CABwTF4WBTHfx7=s+c4HNeEZO0d7Mq7V8Q4qPC2DR-TTrq7JfrA@mail.gmail.com
обсуждение исходный текст
Ответ на [17] CREATE COLLATION default provider  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: [17] CREATE COLLATION default provider  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Wed, Jun 14, 2023 at 9:48 PM Jeff Davis <pgsql@j-davis.com> wrote:
>
> Currently, CREATE COLLATION always defaults the provider to libc.
>
> The attached patch causes it to default to libc if LC_COLLATE/LC_CTYPE
> are specified, otherwise default to the current database default
> collation's provider.

+            if (lccollateEl || lcctypeEl)
+                collprovider = COLLPROVIDER_LIBC;
+            else
+                collprovider = default_locale.provider;

The docs for the CREATE COLLATION option 'locale' say: "This is a
shortcut for setting LC_COLLATE and LC_CTYPE at once."

So it's not intuitive why the check does not include a test for the
presence of 'localeEl', as well? If we consider the presence of
LC_COLLATE _or_ LC_CTYPE options to be a determining factor for some
decision, then the presence of LOCALE option should also lead to the
same outcome.

Otherwise the patch looks good.

> v11-0001-CREATE-COLLATION-default-provider.patch

I believe v11 is a typo, and you really meant v1.

Best regards,
Gurjeet
http://Gurje.et



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

Предыдущее
От: Tommy Pavlicek
Дата:
Сообщение: [PATCH] ltree hash functions
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: PostgreSQL 16 Beta 2 Release Date