Jeff Davis wrote:
> The goal here is to do a permanent:
>
> setlocale(LC_CTYPE, "C")
>
> in the postmaster, and instead use _l() variants where necessary.
What about code in extensions? AFAIU a user can control the
locale in effect by setting the LC_CTYPE argument of
CREATE DATABASE, which ends up in the environment
of backends serving that database.
If it's forced to "C", how can an extension use locale-aware
libc functions?
In theory it's the same problem with LC_COLLATE, except
that functions like tolower()/toupper() are much more likely
to be used in extensions than strcoll().
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/