Re: insensitive collations
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Daniel Verite <daniel@manitou-mail.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-21T17:11:27Z
Lists: pgsql-hackers
Attachments
- v7-0001-Collations-with-nondeterministic-comparison.patch (text/plain) patch v7-0001
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
Commits
-
Collations with nondeterministic comparison
- 5e1963fb764e 12.0 landed
-
Add support for collation attributes on older ICU versions
- b8f9a2a69a27 12.0 landed
-
Make type "name" collation-aware.
- 586b98fdf1aa 12.0 cited
-
Make collation-aware system catalog columns use "C" collation.
- 6b0faf723647 12.0 cited
-
Adjust string comparison so that only bitwise-equal strings are considered
- 656beff59033 8.2.0 cited