Re: insensitive collations - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: insensitive collations
Date
Msg-id 3548cbab-2c29-be93-0c9c-ec24136626ae@2ndquadrant.com
Whole thread Raw
In response to Re: insensitive collations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: insensitive collations
Re: insensitive collations
List pgsql-hackers
On 2019-02-21 09:36, Peter Eisentraut wrote:
>> * Why have you disable this optimization?:
>>
>>>     /* Fast pre-check for equality, as discussed in varstr_cmp() */
>>> -   if (len1 == len2 && memcmp(a1p, a2p, len1) == 0)
>>> +   if ((!sss->locale || sss->locale->deterministic) &&
>>> +       len1 == len2 && memcmp(a1p, a2p, len1) == 0)
>> I don't see why this is necessary. A non-deterministic collation
>> cannot indicate that bitwise identical strings are non-equal.
> Right, I went too far there.
> 
>> * Perhaps you should add a "Tip" referencing the feature to the
>> contrib/citext documentation.
> Good idea.

Here is another patch that fixes these two points.

I have also worked on the tests hoping to appease the cfbot.

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?

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

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ATTACH/DETACH PARTITION CONCURRENTLY
Next
From: Ryan David Sheasby
Date:
Subject: Re: Journal based VACUUM FULL