Re: Thread-safe nl_langinfo() and localeconv()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thread-safe nl_langinfo() and localeconv()
Date: 2025-04-04 07:38:29
Message-ID: 26eb1e67-5171-44b8-ba11-83ece3c27ac4@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31.03.25 15:52, Tom Lane wrote:
> Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
>> I'm not sure what to do with this. If setlocale() and newlocale()
>> indeed behave differently in what set of locale names they accept, then
>> technically we ought to test both of them, since we do use both of them
>> later on. Or maybe we push on with the effort to get rid of setlocale()
>> calls and then just worry about testing newlocale() (as this patch
>> does). But right now, if newlocale() is more permissive, then we could
>> accept locale names that will later fail setlocale() calls, which might
>> be a problem.
>
> I think the clear answer is "let's stop using setlocale(), and then
> not have to worry about any behavioral differences".

Right. That effort is woven into various other ongoing work related to
locales, collations, etc. So for now, I'm going to close this
commitfest entry as done, since $subject was achieved. The rest can be
picked up later, when the required progress in the other work has been made.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-04-04 07:40:01 Re: Quote-less file names in error messages
Previous Message Richard Guo 2025-04-04 07:37:06 Re: Some problems regarding the self-join elimination code