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 1msmhF-0002GK-3V for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 14:04:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msmhD-0005Gf-Un for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 14:04:23 +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 1msmhD-0005GW-Js for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 14:04:23 +0000 Received: from mail.thenautilus.net ([5.79.87.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msmhA-0003lk-Uu for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 14:04:23 +0000 Received: (qmail 23773 invoked from network); 2 Dec 2021 14:04:05 -0000 Received: from unknown (HELO exelion) (dakkar@::ffff:10.111.0.30) by 0 with ESMTPA; 2 Dec 2021 14:04:05 -0000 Date: Thu, 2 Dec 2021 14:04:04 +0000 From: Gianni Ceccarelli To: pgsql-general@lists.postgresql.org Cc: Jakub Jedelsky Subject: Re: case insensitive collation of Greek's sigma Message-ID: <20211202140404.5f8a7d23@exelion> In-Reply-To: References: <9e3220da-d47e-add7-8b97-7c65b12ff6d7@enterprisedb.com> <1989905.1638388164@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I realise this may not be applicable to the original problem, but non-deterministic collations seems to offer a solution:: dakkar@[local] dakkar=3D> create collation "en-US-ins-icu" ( provider=3Dicu, locale=3D'en-US-u-ks-level2', deterministic=3Dfalse ); dakkar@[local] dakkar=3D> select '=CE=A3=CE=A3' =3D '=CF=83=CF=83' collat= e "en-US-ins-icu"; =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 ?column? =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82 t =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 (1 row) dakkar@[local] dakkar=3D> select '=CE=A3=CE=A3' =3D '=CF=83=CF=82' collat= e "en-US-ins-icu"; =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 ?column? =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82 t =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 (1 row) dakkar@[local] dakkar=3D> select '=CE=A3=CE=A3' =3D '=CE=B1' collate "en-= US-ins-icu"; =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 ?column? =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82 f =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=98 (1 row) Notice, though: * I don't understand what that ``-u-`` is doing in ``locale``, but it's necessary * as the docs https://www.postgresql.org/docs/13/collation.html#COLLATION-NONDETERMINIS= TIC say: - B-tree cannot use deduplication with indexes that use a nondeterministic collation - certain operations are not possible with nondeterministic collations, such as pattern matching operations (this means you can't use ``LIKE``) --=20 Dakkar - GPG public key fingerprint =3D A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id =3D 0x75193F88