From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Thread-safe nl_langinfo() and localeconv() |
Date: | 2025-03-27 10:16:07 |
Message-ID: | 5fd94325-032e-49b3-91a4-e49ad1be8d79@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 14.02.25 15:13, Peter Eisentraut wrote:
> On 09.02.25 15:52, Peter Eisentraut wrote:
>> This patch set is still desirable. Here is a rebased version of the
>> v5 patches. I haven't applied any corrections or review comments.
>
> Here is the same patch set with some review comments.
>
> Patch 0001 looks okay to me. I'm just offering some cosmetic
> improvements in patch 0004.
I have committed this patch.
The original patch had a typo that prevented the BSD-ish branch (using
localeconv_l()) from being taken, so it actually used the fallback
uselocale() branch, which then failed on CI on NetBSD. (But conversely,
this gave some testing on CI for the uselocale() branch.)
> Patch 0002 also looks okay, except that the error handling could be
> unified with existing code, as I had previously pointed out. Patch 0005
> fixes that.
I plan to commit this one next, after the above had a bit of time to stew.
> About patch 0003:
>
> I had previously pointed out that the canonicalization might have been
> intentional, and that we have canonicalization of ICU locale names. But
> we don't have to keep the setlocale()-based locale checking
> implementation just for that, I think. (If this was meant to be a real
> feature offered by libc, there should be a get_locale_name(locale_t)
> function.)
POSIX 2024 actually has getlocalename_l(), but it doesn't appear to be
widely implemented.
Anyway, this patch fails tests on CI on NetBSD, so it will need some
further investigation.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2025-03-27 10:20:30 | Re: Fix 035_standby_logical_decoding.pl race conditions |
Previous Message | Ilia Evdokimov | 2025-03-27 10:12:38 | Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment |