Re: insensitive collations

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: insensitive collations
Date: 2019-03-07 07:49:55
Message-ID: e38166a0-c70d-5b90-a98c-530764cdecb3@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-03-05 18:48, Daniel Verite wrote:
>> Older ICU versions (<54) don't support all the locale customization
>> options, so many of my new tests in collate.icu.utf8.sql will fail on
>> older systems. What should we do about that? Have another extra test file?
> Maybe stick to the old-style syntax for the regression tests?
> The declarations that won't work as expected with older ICU versions
> would be:
>
> CREATE COLLATION case_insensitive (provider = icu, locale =
> 'und-u-ks-level2', deterministic = false);
>
> 'und-u-ks-level2' is equivalent to 'und(at)colStrength=secondary'

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.

It would probably be possible to write all the tests for
nondeterministic collations without making use of this functionality,
using only canonically equivalent sequences as test data. But that
would make the tests extremely weird and unintuitive, so I'd like to
avoid that.

After thinking about it a bit more, I think making a new test file is
reasonable. The file is already fairly long anyway, compared to the
typical test file size.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2019-03-07 07:50:36 Re: Re: [HACKERS] Custom compression methods
Previous Message David Steele 2019-03-07 07:42:41 Re: Re: [HACKERS] Custom compression methods