| From: | Jeff Davis <jdavis(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid global LC_CTYPE dependency in pg_locale_icu.c. |
| Date: | 2025-12-16 23:42:40 |
| Message-ID: | E1vVegh-0019Bw-0m@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)evan(dot)chao(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-16 23:59:14 | pgsql: Remove useless code in InjectionPointAttach() |
| Previous Message | Jeff Davis | 2025-12-16 21:00:47 | pgsql: ltree: fix case-insensitive matching. |