Re: Remaining dependency on setlocale()

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Александр Кожемякин <a.kozhemyakin@postgrespro.ru>, Peter Eisentraut <peter@eisentraut.org>, Chao Li <li.evan.chao@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2026-01-27T19:16:34Z
Lists: pgsql-hackers
On Wed, 2026-01-21 at 11:30 -0800, Jeff Davis wrote:
> It seems to be fine in master, and it was only backported to 18, so
> the
> attached patch is only intended for REL_18_STABLE.

Committed.

Regards,
	Jeff Davis




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix crash introduced by incorrect backport 806555e300.

  2. fuzzystrmatch: use pg_ascii_toupper().

  3. Make dmetaphone collation-aware

  4. Avoid global LC_CTYPE dependency in pg_locale_icu.c.

  5. downcase_identifier(): use method table from locale provider.

  6. ltree: fix case-insensitive matching.

  7. Fix multibyte issue in ltree_strncasecmp().

  8. Use multibyte-aware extraction of pattern prefixes.

  9. Add pg_iswcased().

  10. Remove char_tolower() API.

  11. Make regex "max_chr" depend on encoding, not provider.

  12. Change some callers to use pg_ascii_toupper().

  13. Allow pg_locale_t APIs to work when ctype_is_c.

  14. Add #define for UNICODE_CASEMAP_BUFSZ.

  15. Inline pg_ascii_tolower() and pg_ascii_toupper().

  16. Avoid global LC_CTYPE dependency in pg_locale_libc.c.

  17. Force LC_COLLATE to C in postmaster.

  18. Change wchar2char() and char2wchar() to accept a locale_t.

  19. Use pg_ascii_tolower()/pg_ascii_toupper() where appropriate.

  20. inet_net_pton.c: use pg_ascii_tolower() rather than tolower().

  21. isn.c: use pg_ascii_toupper() instead of toupper().

  22. contrib/spi/refint.c: use pg_ascii_tolower() instead.

  23. copyfromparse.c: use pg_ascii_tolower() rather than tolower().

  24. Revert "Tidy up locale thread safety in ECPG library."

  25. Tidy up locale thread safety in ECPG library.

  26. All supported systems have locale_t.