From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Remaining dependency on setlocale() |
Date: | 2024-12-19 16:23:11 |
Message-ID: | 62a14dba-599c-44d8-b74b-212385f5cb07@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17.12.24 19:10, Jeff Davis wrote:
> On Tue, 2024-12-17 at 13:14 +0100, Peter Eisentraut wrote:
>> I think we will need to keep the global LC_CTYPE setting set to
>> something useful, for example so that system error messages come out
>> in
>> the right encoding.
>
> Do we need to rely on the global LC_CTYPE setting? We already use
> bind_textdomain_codeset().
I don't think that would cover messages from the C library (strerror,
dlerror, etc.).
>> But I'm concerned about the the Perl_setlocale() dance in plperl.c.
>> Perl apparently does a setlocale(LC_ALL, "") during startup, and that
>> code is a workaround to reset everything back afterwards. We need to
>> be
>> careful not to break that.
>>
>> (Perl has fixed that in 5.19, but the fix requires that you set
>> another
>> environment variable before launching Perl, which you can't do in a
>> threaded system, so we'd probably need another fix eventually. See
>> <https://github.com/Perl/perl5/issues/8274>.)
>
> I don't fully understand that issue, but I would think the direction we
> are going (keeping the global LC_CTYPE more consistent and relying on
> it less) would make the problem better.
Yes, I think it's the right direction, but we need to figure this issue
out eventually.
From | Date | Subject | |
---|---|---|---|
Next Message | Melanie Plageman | 2024-12-19 16:58:27 | Re: BitmapHeapScan streaming read user and prelim refactoring |
Previous Message | Peter Eisentraut | 2024-12-19 16:18:31 | Re: Add CASEFOLD() function. |