CREATE COLLATION without LOCALE throws error in v15

From: Kyle Spearrin <kspearrin(at)bitwarden(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: Justin Baur <jbaur(at)bitwarden(dot)com>, Vince Grassia <vgrassia(at)bitwarden(dot)com>
Subject: CREATE COLLATION without LOCALE throws error in v15
Date: 2022-12-02 19:14:24
Message-ID: CALDQics_oBEYfOnu_zH6yw9WR1waPCmcrqxQ8+39hK3Op=z2UQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,
I wanted to report a bug with the CREATE COLLATION query in Postgres 15.

The following query works in Postgres 12-14:

CREATE COLLATION "postgresIndetermanisticCollation" (LC_COLLATE =
'en-u-ks-primary',
LC_CTYPE = 'en-u-ks-primary',
PROVIDER = icu,
DETERMINISTIC = False
);

However, in Postgres 15 we see the following error:

ERROR: parameter "locale" must be specified

Changing the query to following resolves the issue:

CREATE COLLATION "postgresIndetermanisticCollation" (LOCALE =
'en-u-ks-primary',
PROVIDER = icu,
DETERMINISTIC = False
);

According to the docs here
<https://www.postgresql.org/docs/current/sql-createcollation.html>, we
should be able to execute this query either way (as is evident when testing
in versions 11-14).

This causes problems with queries generated by our Entity Framework Core
ORM tool that uses npgsql. We don't have control to change the way
the COLLATION query is created, therefore preventing us from supporting
Postgres 15.

--
Kyle Spearrin

Follow Bitwarden on social media:
Twitter <https://twitter.com/bitwarden> | Facebook
<https://www.facebook.com/bitwarden> | GitHub <https://github.com/bitwarden>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2022-12-02 19:40:10 Re: Bug in jsonb_path_exists (maybe _match) one-element scalar/variable jsonpath handling
Previous Message Alexander Korotkov 2022-12-02 17:47:03 Re: Bug in jsonb_path_exists (maybe _match) one-element scalar/variable jsonpath handling