pgsql: Avoid global LC_CTYPE dependency in pg_locale_icu.c. - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: Avoid global LC_CTYPE dependency in pg_locale_icu.c.
Date
Msg-id E1vVegh-0019Bw-0m@gemulon.postgresql.org
Whole thread Raw
List 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.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(-)


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: pgsql: ltree: fix case-insensitive matching.
Next
From: Michael Paquier
Date:
Subject: pgsql: Remove useless code in InjectionPointAttach()