pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Igal @ Lucee.org <igal@lucee.org>
To: pgsql-general@lists.postgresql.org
Subject: Re: Case Insensitive Comparison with Postgres 12
Date: Thu, 10 Oct 2019 08:34:26 -0700
Message-ID: <d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org> (raw)
In-Reply-To: <7f3e8791-fa18-b355-d377-465cba605616@gmx.net>
References: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com>
	<9ad4f42faa10f1aa4e81e3ed8160d36d0d39856a.camel@cybertec.at>
	<9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org>
	<7f3e8791-fa18-b355-d377-465cba605616@gmx.net>

Thomas,

On 10/10/2019 6:22 AM, Thomas Kellerer wrote:

> Igal @ Lucee.org schrieb am 10.10.2019 um 14:41:
>> Thank you all for replying.  I tried to use the locale suggested by
>> both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting
>> false for a simple comparison of 'Abc' = 'abc'.  I tried the locale
>> both as a 'string' and as an "identifier":
>>
>>> drop collation if exists case_insensitive;
>>> create collation case_insensitive (
>>     provider=icu, locale="en-US-u-ks-level2", deterministic=false
>> );
>>
>>> select 'Abc' = 'abc' collate case_insensitive as is_equal;
>> is_equal|
>> --------|
>> false   |
>>
>> What am I doing wrong here?
> Check the version of libicu that your Linux is using.
> That locale format requires version 54 or later.
> (My up-to-date CentOS 7.7 for example is still using version 50 and the EDB Windows binaries include version 53).
>
> In another thread about ICU problems, Daniel Verite explained that in more detail:
>
>> With ICU 53 or older, instead of the locale above, we must use the old-style syntax:
>>
>>   locale = 'de-DE@colStrength=secondary'
> In your case I guess, it should be
>
>     locale = 'en-US@colStrength=secondary'

That works, thank you!

I also have CentOS installed on that machine: CentOS Linux release 
7.7.1908 (Core), showing libicu Version 50.2 via `yum info libicu`.

Best,

Igal








view thread (10+ messages)  latest in thread

Message-ID: <d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org>
Permalink:  ../d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org/
Also on:    postgresql.org/message-id/d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: igal@lucee.org
  Subject: Re: Case Insensitive Comparison with Postgres 12
  In-Reply-To: <d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org>
  References: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com> <9ad4f42faa10f1aa4e81e3ed8160d36d0d39856a.camel@cybertec.at> <9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org> <7f3e8791-fa18-b355-d377-465cba605616@gmx.net> <d549e8ae-789b-781c-7b07-1850ae9f3294@lucee.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox