From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Force LC_COLLATE to C in postmaster.
Date: Wed, 16 Jul 2025 21:14:25 +0000
Message-ID: <E1uc9SL-006eJ6-1l@gemulon.postgresql.org> (raw)
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>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5e6e42e44fe10cab616b4fbe9725df03c987c90a
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 2 +-
doc/src/sgml/charset.sgml | 2 +-
doc/src/sgml/ref/create_database.sgml | 45 ++++++++++++++++++-----------------
doc/src/sgml/ref/createdb.sgml | 3 ++-
src/backend/main/main.c | 16 ++++++++-----
src/backend/utils/init/postinit.c | 11 ++++-----
6 files changed, 42 insertions(+), 37 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Force LC_COLLATE to C in postmaster.
In-Reply-To: <E1uc9SL-006eJ6-1l@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox