]> granicus.if.org Git - postgresql/commit
Fix planner's test for case-foldable characters in ILIKE with ICU.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Aug 2019 17:15:48 +0000 (13:15 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Aug 2019 17:15:48 +0000 (13:15 -0400)
commit886cf85b52cfdd84c0ff9b24193c7e0e0035b1c7
tree5b3cf8c41220f622df5e1b273f18c441fbfc4cd2
parentb3670f48d8bc83a334a97e7270c5d59f694c4126
Fix planner's test for case-foldable characters in ILIKE with ICU.

As coded, the ICU-collation path in pattern_char_isalpha() failed
to consider regular ASCII letters to be case-varying.  This led to
like_fixed_prefix treating too much of an ILIKE pattern as being a
fixed prefix, so that indexscans derived from an ILIKE clause might
miss entries that they should find.

Per bug #15892 from James Inform.  This is an oversight in the original
ICU patch (commit eccfef81e), so back-patch to v10 where that came in.

Discussion: https://postgr.es/m/15892-e5d2bea3e8a04a1b@postgresql.org
src/backend/utils/adt/selfuncs.c
src/test/regress/expected/collate.icu.utf8.out
src/test/regress/sql/collate.icu.utf8.sql