pgsql: Fix pg_iswcased().

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pg_iswcased().
Date: 2026-09-10 03:44:07
Message-ID: E1x4Vhm-00000004E3g-2gqq@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <noah(at)leadboat(dot)com>
Discussion: https://postgr.es/m/20260826221526.89.noahmisch@microsoft.com
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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-09-10 04:11:22 pgsql: pgbench: Improve handling of NULL in \gset and \aset
Previous Message Jeff Davis 2026-09-10 03:44:01 pgsql: Fix pg_iswcased().