From: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [17] CREATE COLLATION default provider |
Date: | 2023-06-17 16:09:02 |
Message-ID: | CABwTF4WBTHfx7=s+c4HNeEZO0d7Mq7V8Q4qPC2DR-TTrq7JfrA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 14, 2023 at 9:48 PM Jeff Davis <pgsql(at)j-davis(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jonathan S. Katz | 2023-06-17 16:14:16 | PostgreSQL 16 Beta 2 Release Date |
Previous Message | Tommy Pavlicek | 2023-06-17 15:45:10 | [PATCH] ltree hash functions |