Re: BUG #15892: URGENT: Using an ICU collation in a primary key column breaks ILIKE query
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Daniel Verite <daniel@manitou-mail.org>,
James Inform <james.inform@pharmapp.de>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-bugs@lists.postgresql.org
Date: 2019-08-11T21:32:49Z
Lists: pgsql-bugs
Attachments
- fix-selfuncs-ilike-v3.patch (text/x-diff) patch v3
Arthur Zakirov <a.zakirov@postgrespro.ru> writes: > On 04.07.2019 19:50, Daniel Verite wrote: >> Yes. It is because of the index that the code checks if the ILIKE >> can be evaluated with an index lookup. Otherwise it doesn't. >> If you feel like recompiling with a temporary fix against v11.4 to do >> your own tests, please try the attached patch. > Also this patch works. I thinks we need to use some ICU function to > check whether a char is a letter. This topic seems to have slipped through the cracks, which is too bad because we surely could have gotten it fixed in time for last week's releases. Oh well. I think Daniel's patch leaves more on the table than it needs to, and I don't like Arthur's patch because it's assuming more than it should about whether it's okay to pass a "char" to u_isalpha(). I propose that we do things as attached, instead. (I also added a regression test case.) regards, tom lane
Commits
-
Fix planner's test for case-foldable characters in ILIKE with ICU.
- c914e74d2dee 11.6 landed
- 886cf85b52cf 10.11 landed
- c0c12ce391d8 12.0 landed
- 03c811a483b2 13.0 landed