Re: insensitive collations - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: insensitive collations
Date
Msg-id e38166a0-c70d-5b90-a98c-530764cdecb3@2ndquadrant.com
Whole thread Raw
In response to Re: insensitive collations  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: insensitive collations
List 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@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


pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: Re: [HACKERS] Custom compression methods
Next
From: Alexander Korotkov
Date:
Subject: Re: Re: [HACKERS] Custom compression methods