Re: CREATE COLLATION without LOCALE throws error in v15

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: CREATE COLLATION without LOCALE throws error in v15
Дата
Msg-id 7b99b4a7fc5284008bae32b77a776d25b4a400bc.camel@j-davis.com
обсуждение исходный текст
Ответ на CREATE COLLATION without LOCALE throws error in v15  (Kyle Spearrin <kspearrin@bitwarden.com>)
Ответы Re: CREATE COLLATION without LOCALE throws error in v15
Список pgsql-bugs
On Fri, 2022-12-02 at 14:14 -0500, Kyle Spearrin wrote:
> However, in Postgres 15 we see the following error:
>
> ERROR:  parameter "locale" must be specified

I agree that this is some kind of bug. The docs seem pretty clear[1]:

  "locale

    This is a shortcut for setting LC_COLLATE and LC_CTYPE
    at once. If you specify this, you cannot specify either
    of those parameters."

The error appears to come from commit f2553d4306 ("Add option to use
ICU as global locale provider"). My guess is that it was seen as
clearer to write LOCALE, and that the error wasn't expected to cause
anyone a problem. But, given that it's causing a problem for ORMs, we
should fix it.

Simple patch attached. I intend to commit and backpatch to 15 in the
next day or so.

Looking at the docs for CREATE COLLATION[1] and CREATE DATABASE[2], we
could probably do more to make this area consistent. But that's for
another discussion.

[1] https://www.postgresql.org/docs/devel/sql-createcollation.html
[2] https://www.postgresql.org/docs/devel/sql-createdatabase.html


--
Jeff Davis
PostgreSQL Contributor Team - AWS



Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Bug in jsonb_path_exists (maybe _match) one-element scalar/variable jsonpath handling
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: CREATE COLLATION without LOCALE throws error in v15