Force LC_COLLATE to C in postmaster.

Jeff Davis <jdavis@postgresql.org>

Commit: 5e6e42e44fe10cab616b4fbe9725df03c987c90a
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2025-07-16T21:13:18Z
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>

Files

Discussion