]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Force LC_COLLATE to C in postmaster.
authorJeff Davis <jdavis@postgresql.org>
Wed, 16 Jul 2025 21:13:18 +0000 (14:13 -0700)
committerJeff Davis <jdavis@postgresql.org>
Wed, 16 Jul 2025 21:13:18 +0000 (14:13 -0700)
commit5e6e42e44fe10cab616b4fbe9725df03c987c90a
treebe4845346e0c2b474c6f49fa4994cb6d5acad703
parent0858f0f96ebb891c8960994f023ed5a17b758a38
Force LC_COLLATE to C in postmaster.

Avoid dependence on setlocale().

strcoll(), etc., are not called directly; all collation-sensitive
calls should go through pg_locale.c and use the appropriate
provider. By setting LC_COLLATE to C, we avoid accidentally depending
on libc behavior when using a different provider.

No behavior change in the backend, but it's possible that some
extensions will be affected. Such extensions should be updated to use
the pg_locale_t APIs.

Discussion: https://postgr.es/m/9875f7f9-50f1-4b5d-86fc-ee8b03e8c162@eisentraut.org
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
doc/src/sgml/catalogs.sgml
doc/src/sgml/charset.sgml
doc/src/sgml/ref/create_database.sgml
doc/src/sgml/ref/createdb.sgml
src/backend/main/main.c
src/backend/utils/init/postinit.c