Re: insensitive collations - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: insensitive collations
Date
Msg-id bfb61bc7-d2f8-48a5-acd5-b43f14ebce37@manitou-mail.org
Whole thread Raw
In response to Re: insensitive collations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: insensitive collations
List 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


pgsql-hackers by date:

Previous
From: Arthur Zakirov
Date:
Subject: Re: [PROPOSAL] Drop orphan temp tables in single-mode
Next
From: Magnus Hagander
Date:
Subject: Re: psql show URL with help