Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG - Mailing list pgsql-hackers

From Joe Conway
Subject Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Date
Msg-id 1645ebad-798f-87ad-43ac-72d2bf14d2d6@cd
Whole thread Raw
Responses Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
List pgsql-hackers
On 6/29/23 22:13, Tristan Partin wrote:
> On Mon Jun 5, 2023 at 11:00 AM CDT, Heikki Linnakangas wrote:
>> I think the uselocale() call renders ineffective the setlocale() calls 
>> that we make later. Maybe we should replace our setlocale() calls with 
>> uselocale(), too.
> 
> For what it's worth to everyone else in the thread (especially Joe), I
> have a patch locally that fixes the mentioned bug using uselocale(). I
> am not sure that it is worth committing for v16 given how _large_ (the
> patch is actually quite small, +216 -235) of a change it is. I am going
> to spend tomorrow combing over it a bit more and evaluating other
> setlocale uses in the codebase.

(moving thread to hackers)

I don't see a patch attached -- how is it different than what I posted a 
week ago and added to the commitfest here?

  https://commitfest.postgresql.org/43/4413/

FWIW, if you are proposing replacing all uses of setlocale() with 
uselocale() as Heikki suggested:

1/ I don't think that is pg16 material, and almost certainly not 
back-patchable to earlier.

2/ It probably does not solve all of the identified issues caused by the 
newer perl libraries by itself, i.e. I believe the patch posted to the 
CF is still needed.

3/ I believe it is probably the right way to go for pg17+, but I would 
love to hear opinions from Jeff Davis, Peter Eisentraut, and/or Thomas 
Munroe (the locale code "usual suspects" ;-)), and others, about that.

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com


Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: cataloguing NOT NULL constraints
Next
From: Matthias van de Meent
Date:
Subject: Extensible storage manager API - SMGR hook Redux