Re: Remaining dependency on setlocale() - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Remaining dependency on setlocale()
Date
Msg-id fc61c88f-ab78-4870-ada6-e915e9dc7a19@proxel.se
Whole thread Raw
In response to Re: Remaining dependency on setlocale()  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Remaining dependency on setlocale()
List pgsql-hackers
On 8/8/24 12:45 AM, Jeff Davis wrote:
> 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().

I am leaning towards that we should write our own pure ascii functions 
for this. Since we do not support any non-ascii compatible encodings 
anyway I do not see the point in having locale support in most of these 
call-sites.

Andewas



pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: long-standing data loss bug in initial sync of logical replication
Next
From: Michail Nikolaev
Date:
Subject: Re: Conflict detection and logging in logical replication