pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Case Insensitive Comparison with Postgres 12
Date: Thu, 10 Oct 2019 15:22:41 +0200
Message-ID: <7f3e8791-fa18-b355-d377-465cba605616@gmx.net> (raw)
In-Reply-To: <9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org>
References: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com>
	<9ad4f42faa10f1aa4e81e3ed8160d36d0d39856a.camel@cybertec.at>
	<9803fc4d-7fe4-33f3-014e-defdfcc59873@lucee.org>

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'

Thomas





view thread (10+ messages)  latest in thread

Message-ID: <7f3e8791-fa18-b355-d377-465cba605616@gmx.net>
Permalink:  ../7f3e8791-fa18-b355-d377-465cba605616@gmx.net/
Also on:    postgresql.org/message-id/7f3e8791-fa18-b355-d377-465cba605616@gmx.net

 · 

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: spam_eater@gmx.net
  Subject: Re: Case Insensitive Comparison with Postgres 12
  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>

* 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