Remove support for null pg_locale_t most places.
Jeff Davis <jdavis@postgresql.org>
Remove support for null pg_locale_t most places. Previously, passing NULL for pg_locale_t meant "use the libc provider and the server environment". Now that the database collation is represented as a proper pg_locale_t (not dependent on setlocale()), remove special cases for NULL. Leave wchar2char() and char2wchar() unchanged for now, because the callers don't always have a libc-based pg_locale_t available. Discussion: https://postgr.es/m/cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org Reviewed-by: Peter Eisentraut, Andreas Karlsson
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/hash/hashfunc.c | modified | +4 −6 |
| src/backend/regex/regc_pg_locale.c | modified | +4 −109 |
| src/backend/utils/adt/formatting.c | modified | +21 −63 |
| src/backend/utils/adt/like.c | modified | +3 −7 |
| src/backend/utils/adt/pg_locale.c | modified | +28 −45 |
| src/backend/utils/adt/varchar.c | modified | +4 −6 |
| src/backend/utils/adt/varlena.c | modified | +9 −19 |
Discussion
- tiny step toward threading: reduce dependence on setlocale() 33 messages · 2024-06-06 → 2025-10-28