agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix pg_iswcased().
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix pg_iswcased().
@ 2026-09-10 03:44 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2026-09-10 03:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@leadboat.com>
Discussion: https://postgr.es/m/20260826221526.89.noahmisch@microsoft.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/43a948b7b252344a79eb49b9f3c5c8832bee19a9

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix pg_iswcased().
@ 2026-09-10 03:44 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2026-09-10 03:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@leadboat.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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-10 03:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 03:44 pgsql: Fix pg_iswcased(). Jeff Davis <jdavis@postgresql.org>
2026-09-10 03:44 pgsql: Fix pg_iswcased(). Jeff Davis <jdavis@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox