From: Pavel Křehula <pavel.krehula@nlm.cz>
To: Igal Sapir <igal@lucee.org>
To: Psql_General (E-mail) <pgsql-general@postgresql.org>
Subject: Re: Case Insensitive Comparison with Postgres 12
Date: Wed, 09 Oct 2019 07:10:36 +0000
Message-ID: <emea6bc853-e092-4e8e-bf6f-854952b87f80@pavel6> (raw)
In-Reply-To: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com>
References: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com>
Hello,
use correct locale identifier, in your case it should be:
create collation "case_insensitive" (provider=icu,
locale="en-US-u-ks-level2", deterministic = false);
See
http://www.unicode.org/reports/tr35/tr35-collation.html#Setting_Options
for available 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. Most likely
>the collation that I chose is wrong, but I'm not sure how to choose the
>correct one (for English/US?). Here is my snippet:
>
>create collation case_insensitive(
> provider=icu, locale='en-US-x-icu', deterministic=false
>);
>select 'Abc' = 'abc' collate case_insensitive;
>
>I expected true but am getting false.
>
>Any thoughts?
>
>Thanks,
>
>Igal
>
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: pavel.krehula@nlm.cz, igal@lucee.org
Subject: Re: Case Insensitive Comparison with Postgres 12
In-Reply-To: <emea6bc853-e092-4e8e-bf6f-854952b87f80@pavel6>
References: <CA+zig0-9TpMC6cmi9Vz5sGM5abhh0XF7H+xokjcRUSSmtV4aYQ@mail.gmail.com> <emea6bc853-e092-4e8e-bf6f-854952b87f80@pavel6>
* 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