Re: CREATE COLLATION must be specified

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Shay Rojansky <roji(at)roji(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CREATE COLLATION must be specified
Date: 2022-05-30 08:17:36
Message-ID: CACJufxER70bX_0_BWX+Wk_RFDS8hjOyCoDTWNs98RYFODQc2_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--ok
CREATE COLLATION some_collation (
PROVIDER = icu,
LOCALE = 'en-u-ks-primary',
DETERMINISTIC = FALSE
);

CREATE COLLATION some_collation1 (
PROVIDER = icu,
LC_COLLATE = 'en-u-ks-primary',
LC_CTYPE = 'en-u-ks-primary',
DETERMINISTIC = FALSE
);
--ERROR: parameter "locale" must be specified

CREATE COLLATION some_collation2 (
LC_COLLATE = 'en-u-ks-primary',
LC_CTYPE = 'en-u-ks-primary',
LOCALE = 'en-u-ks-primary',
PROVIDER = icu,
DETERMINISTIC = FALSE
);
--ERROR: conflicting or redundant options
--DETAIL: LOCALE cannot be specified together with LC_COLLATE or LC_CTYPE.

Since LC_COLLATE is bundled together with LC_CTYPE.
In 15, If the provider is ICU then LC_COLLATE and LC_CTYPE are no longer
required?

On Sat, May 28, 2022 at 11:55 PM Peter Eisentraut <
peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:

> On 28.05.22 20:16, Shay Rojansky wrote:
> > CREATE COLLATION some_collation (LC_COLLATE = 'en-u-ks-primary',
> > LC_CTYPE = 'en-u-ks-primary',
> > PROVIDER = icu,
> > DETERMINISTIC = False
> > );
> >
> > This works on PG14, but on PG15 it errors with 'parameter "locale" must
> > be specified'.
> >
> > I wanted to make sure this breaking change is intentional (it doesn't
> > seem documented in the release notes or in the docs for CREATE
> COLLATION).
>
> This change is intentional, but the documentation could be improved.
>
>
>

--
I recommend David Deutsch's <<The Beginning of Infinity>>

Jian

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-05-30 08:21:36 Re: Skipping schema changes in publication
Previous Message shiy.fnst@fujitsu.com 2022-05-30 08:13:07 RE: Hash index build performance tweak from sorting