Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k35YO-0003G1-VQ for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Aug 2020 22:37:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k35YM-00071q-Pj for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Aug 2020 22:37:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k35YM-00071j-Jt for pgsql-bugs@lists.postgresql.org; Tue, 04 Aug 2020 22:37:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k35YJ-00047d-EX for pgsql-bugs@lists.postgresql.org; Tue, 04 Aug 2020 22:37:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 074Maqa52465508; Tue, 4 Aug 2020 18:36:53 -0400 From: Tom Lane To: "Daniel Verite" cc: arnaud.perrier@gmail.com, Peter Eisentraut , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16570: Collation not working In-reply-to: <23d3f3ec-5022-4535-8bd4-bb2c56456767@manitou-mail.org> References: <23d3f3ec-5022-4535-8bd4-bb2c56456767@manitou-mail.org> Comments: In-reply-to "Daniel Verite" message dated "Mon, 03 Aug 2020 19:35:50 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2465506.1596580612.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 04 Aug 2020 18:36:52 -0400 Message-ID: <2465507.1596580612@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Daniel Verite" 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 =3D icu, locale =3D >> '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* variant= s of the example CREATE COLLATION digitslast (provider =3D icu, locale =3D 'en-u-kr-latn-d= igit'); CREATE COLLATION digitslast (provider =3D icu, locale =3D 'en@colReorder=3D= 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 =3D icu, locale =3D 'en-u-kr-latn-d= igit'); or for ICU versions before 54, CREATE COLLATION digitslast (provider =3D icu, locale =3D 'en@colReorder=3D= 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