Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iI7Sp-0003ml-2X for pgsql-general@arkaria.postgresql.org; Wed, 09 Oct 2019 08:36:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iI7Sm-00081r-Ep for pgsql-general@arkaria.postgresql.org; Wed, 09 Oct 2019 08:36:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iI67R-0006xt-KG for pgsql-general@lists.postgresql.org; Wed, 09 Oct 2019 07:10:45 +0000 Received: from mail.nlm.cz ([85.93.108.20]) by makus.postgresql.org with esmtps (TLS1.1:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1iI67O-0001D0-3u for pgsql-general@postgresql.org; Wed, 09 Oct 2019 07:10:44 +0000 X-Footer: bmxtLmN6 Received: from localhost ([127.0.0.1]) by mail.nlm.cz with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Wed, 9 Oct 2019 09:10:36 +0200 From: =?utf-8?q?Pavel=20K=c5=99ehula?= To: "Igal Sapir" , "Psql_General (E-mail)" Subject: Re: Case Insensitive Comparison with Postgres 12 Date: Wed, 09 Oct 2019 07:10:36 +0000 Message-Id: In-Reply-To: References: Reply-To: =?utf-8?q?Pavel=20K=c5=99ehula?= User-Agent: eM_Client/7.2.35595.0 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------=_MBD1C066E3-017D-4760-9608-3C40170A4E4B" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --------=_MBD1C066E3-017D-4760-9608-3C40170A4E4B Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, use correct locale identifier, in your case it should be: create collation "case_insensitive" (provider=3Dicu,=20 locale=3D"en-US-u-ks-level2", deterministic =3D false); See=20 http://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options for available options. -- Pavel Dne 09.10.2019 0:51:52, "Igal Sapir" napsal: >I am trying to test a simple case insensitive comparison. Most likely=20 >the collation that I chose is wrong, but I'm not sure how to choose the=20 >correct one (for English/US?). Here is my snippet: > >create collation case_insensitive( > provider=3Dicu, locale=3D'en-US-x-icu', deterministic=3Dfalse >); >select 'Abc' =3D 'abc' collate case_insensitive; > >I expected true but am getting false. > >Any thoughts? > >Thanks, > >Igal > --------=_MBD1C066E3-017D-4760-9608-3C40170A4E4B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
= Hello,
use correct locale identifier, in your case it should be:
= create collation "case_insensitive" (provider=3Dicu, locale=3D"en-US-u-ks-l= evel2", deterministic =3D false);

See=C2=A0http://www.u= nicode.org/reports/tr35/tr35-collation.html#Setting_Options
for av= ailable options.

--
Pavel

Dne 09.10.2019 0:51:52, "Igal Sapir" <igal@lucee.org> napsal:

I am trying to test a simple case insensitive comparison.= =C2=A0 Most likely the collation that I chose is wrong, but I'm not sure ho= w to choose the correct one (for English/US?).=C2=A0 Here is my snippet:
create collation case_insensitive(
=C2=A0 =C2=A0 provider=3Dicu, locale=3D'en-US-x-icu', deterministic=3Dfa= lse
);
select 'Abc' =3D 'abc' collate case_insensitive;

I exp= ected true but am getting false.

Any thoughts?

Thanks,

Igal

--------=_MBD1C066E3-017D-4760-9608-3C40170A4E4B--