Re: BUG #16570: Collation not working

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
Cc: arnaud(dot)perrier(at)gmail(dot)com, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16570: Collation not working
Date: 2020-08-04 22:36:52
Message-ID: 2465507.1596580612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Daniel Verite" <daniel(at)manitou-mail(dot)org> writes:
> PG Bug reporting form wrote:
>> The collation to order digits after latin characters from the official
>> documentation https://www.postgresql.org/docs/12/collation.html
>>
>> CREATE COLLATION digitslast (provider = icu, locale =
>> 'en-u-kr-latn-digit');

> The doc has this caveat:
> "The examples using the k* subtags require at least ICU version 54."
> Since you're using ICU 53, the syntax mentioned above for the locale
> argument doesn't work. It doesn't error out, it's just being ignored.

It seems from this bug report that the OP copied-and-pasted *both* variants
of the example

CREATE COLLATION digitslast (provider = icu, locale = 'en-u-kr-latn-digit');
CREATE COLLATION digitslast (provider = icu, locale = 'en(at)colReorder=latn-digit');

without noticing the caveat (which is a good deal further down anyway).

I wonder if we could improve this by dropping the separate caveat and
writing each example like:

CREATE COLLATION digitslast (provider = icu, locale = 'en-u-kr-latn-digit');
or for ICU versions before 54,
CREATE COLLATION digitslast (provider = icu, locale = 'en(at)colReorder=latn-digit');

That'd be a little repetitive, but there are only five such examples,
and it'd be way harder to mistake the meaning then.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Arnaud Perrier 2020-08-05 06:41:37 Re: BUG #16570: Collation not working
Previous Message PG Bug reporting form 2020-08-04 18:21:45 BUG #16573: pgbouncer 1.14 addition to EL6 breaks installation