CREATE COLLATION must be specified

Started by Shay Rojanskyover 3 years ago4 messages
#1Shay Rojansky
roji@roji.org

Hi all,

Testing on the PG15 beta, I'm getting new failures when trying to create a
collation:

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).

Shay

#2Peter Eisentraut
peter.eisentraut@enterprisedb.com
In reply to: Shay Rojansky (#1)
Re: CREATE COLLATION must be specified

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.

#3jian he
jian.universality@gmail.com
In reply to: Peter Eisentraut (#2)
Re: CREATE COLLATION must be specified

--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.eisentraut@enterprisedb.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

#4Shay Rojansky
roji@roji.org
In reply to: Peter Eisentraut (#2)
Re: CREATE COLLATION must be specified

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 think this is still missing in the PG15 release notes (
https://www.postgresql.org/docs/15/release-15.html).