Re: On non-Windows, hard depend on uselocale(3) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: On non-Windows, hard depend on uselocale(3)
Date
Msg-id CA+hUKGLs9ccA7pUfphZOuf_fcVq2FAai7Cm0pmbQk0Qcs4VoVQ@mail.gmail.com
Whole thread Raw
In response to Re: On non-Windows, hard depend on uselocale(3)  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: On non-Windows, hard depend on uselocale(3)
List pgsql-hackers
On Sat, Aug 10, 2024 at 1:29 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> Here is a new attempt at this can of portability worms.

Slightly better version:

* it's OK to keep relying on the global locale in the backend; for
now, we know that LC_NUMERIC is set in main(), and in the
multi-threaded future calling setlocale() even transiently will be
banned, so it seems it'll be OK to just keep doing that, right?

* we could use LC_C_LOCALE to get a "C" locale slightly more
efficiently on those; we could define it ourselves for other systems,
using pg_get_c_locale()

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Remaining dependency on setlocale()
Next
From: Thomas Munro
Date:
Subject: Re: On non-Windows, hard depend on uselocale(3)