From: Jeff Davis <pgsql@j-davis.com>
To: Joe Conway <mail@joeconway.com>
To: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Remaining dependency on setlocale()
Date: Wed, 07 Aug 2024 15:45:19 -0700
Message-ID: <45fcc802c66fdf52f4420b8cbe09e4fe26cd84fe.camel@j-davis.com> (raw)
In-Reply-To: <57a3f214-41bc-4954-ac09-8eae039137e8@joeconway.com>
References: <4c5da86af36a0d5e430eee3f60ce5e06f1b5cd34.camel@j-davis.com>
<1841102.1722982989@sss.pgh.pa.us>
<CA+hUKGK7qKDHgoh1HuvMhtcpAwwVBA5BDt33vCzYYqCLfQTtzw@mail.gmail.com>
<5b169990d1f602c3aa778a27f8516032ed899c99.camel@j-davis.com>
<57a3f214-41bc-4954-ac09-8eae039137e8@joeconway.com>
On Wed, 2024-08-07 at 13:28 -0400, Joe Conway wrote:
> FWIW I see all of these in glibc:
>
> isalnum_l, isalpha_l, isascii_l, isblank_l, iscntrl_l, isdigit_l,
> isgraph_l, islower_l, isprint_l, ispunct_l, isspace_l, isupper_l,
> isxdigit_l
My point was just that there are a lot of those call sites (especially
for isspace()) in various parsers. It feels like a lot of code churn to
change all of them, when a lot of them seem to be intended for ascii
anyway.
And where do we get the locale_t structure from? We can create our own
at database connection time, and supply it to each of those call sites,
but I'm not sure that's a huge advantage over just using uselocale().
Regards,
Jeff Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, mail@joeconway.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Remaining dependency on setlocale()
In-Reply-To: <45fcc802c66fdf52f4420b8cbe09e4fe26cd84fe.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox