From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid global LC_CTYPE dependency in pg_locale_icu.c.
Date: Tue, 16 Dec 2025 23:42:40 +0000
Message-ID: <E1vVegh-0019Bw-0m@gemulon.postgresql.org> (raw)
Avoid global LC_CTYPE dependency in pg_locale_icu.c.
ICU still depends on libc for compatibility with certain historical
behavior for single-byte encodings. Make the dependency explicit by
holding a locale_t object when required.
We should consider a better solution in the future, such as decoding
the text to UTF-32 and using u_tolower(). That would be a behavior
change and require additional infrastructure though; so for now, just
avoid the global LC_CTYPE dependency.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0a90df58cf38cf68d59c6841513be98aeeff250e
Modified Files
--------------
src/backend/utils/adt/pg_locale_icu.c | 47 ++++++++++++++++++++++++++++++++---
src/include/utils/pg_locale.h | 1 +
2 files changed, 44 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Avoid global LC_CTYPE dependency in pg_locale_icu.c.
In-Reply-To: <E1vVegh-0019Bw-0m@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox