Re: insensitive collations

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Peter Eisentraut" <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: "Peter Geoghegan" <pg(at)bowt(dot)ie>,"pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: insensitive collations
Date: 2019-03-07 19:04:30
Message-ID: bfb61bc7-d2f8-48a5-acd5-b43f14ebce37@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:

> The problem is not the syntax but that the older ICU versions don't
> support the *functionality* of ks-level2 or colStrength=secondary. If
> you try it, you will simply get a normal case-sensitive behavior.

My bad, I see now that the "old locale extension syntax" was actually
introduced at the same time than the "language tag syntax" in ICU 54:
http://bugs.icu-project.org/trac/ticket/8260

With previous versions, we'd need to call ucol_setAttribute(),
with the attributes and values defined here:
http://icu-project.org/apiref/icu4c/ucol_8h.html
for instance to get colStrength=secondary:
ucol_setAttribute(coll, UCOL_STRENGTH , UCOL_SECONDARY, &status);
which I've just checked gives the expected result with ICU-4.2.
These attributes are flagged as "Stable: ICU 2.0" up to
"Stable: ICU 2.8" (for UCOL_NUMERIC_COLLATION ).

So if we really wanted to have these functionalities with pre-54 ICU,
we could but that would mean implementing an interface to pass
to CREATE COLLATION the attributes/values we want to support.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2019-03-07 19:44:07 Re: psql show URL with help
Previous Message Arthur Zakirov 2019-03-07 18:49:33 Re: [PROPOSAL] Drop orphan temp tables in single-mode