On Wed, Jun 14, 2023 at 9:48 PM Jeff Davis <pg...@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