Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tristan Partin <tristan(at)neon(dot)tech>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, gdo(at)leader(dot)it
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Date: 2023-06-30 12:13:10
Message-ID: 1645ebad-798f-87ad-43ac-72d2bf14d2d6@cd
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-06-30 12:46:44 Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()
Previous Message Andrew Dunstan 2023-06-30 12:11:27 Re: BUG #17994: Invalidating relcache corrupts tupDesc inside ExecEvalFieldStoreDeForm()

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-06-30 12:26:44 Extensible storage manager API - SMGR hook Redux
Previous Message Alvaro Herrera 2023-06-30 11:44:03 Re: cataloguing NOT NULL constraints