Fix pg_iswcased().

Commits 630706ced0 and 9c8de15969 lost some encoding-specific nuances:
in libc with EUC encodings, or in ICU with any non-UTF8 encoding, we
cannot easily classify characters, so we must assume they are
case-varying. Restore these behaviors.

Previously, ILIKE using an index scan could cause wrong results.

Reported-by: Noah Misch <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b264391a846e8b5917b00dde2399c38843c75bb8

Modified Files
--------------
src/backend/utils/adt/pg_locale.c      |  5 +++++
src/backend/utils/adt/pg_locale_icu.c  | 16 ++++++++++++++-
src/backend/utils/adt/pg_locale_libc.c | 36 ++++++++++++++++++++++++++++++----
3 files changed, 52 insertions(+), 5 deletions(-)

Reply via email to