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

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Tristan Partin" <tristan(at)neon(dot)tech>, <joe(at)cd>, "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-07-05 20:53:16
Message-ID: CTUJC778UCIW.28QKG8IC14KCO@gonk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon Jul 3, 2023 at 9:42 AM CDT, Tristan Partin wrote:
> Thanks for your patience. Attached is a patch that should cover all the
> problematic use cases of setlocale(). There are some setlocale() calls in
> tests, initdb, and ecpg left. I plan to get to ecpglib before the final
> version of this patch after I abstract over Windows not having
> uselocale(). I think leaving initdb and tests as is would be fine, but I
> am also happy to just permanently purge setlocale() from the codebase
> if people see value in that. We could also poison[0] setlocale() at that
> point.
>
> [0]: https://gcc.gnu.org/onlinedocs/cpp/Pragmas.html

Here is a v2 with best effort Windows support. My patch currently
assumes that you either have uselocale() or are Windows. I dropped the
environment variable hacks, but could bring them back if we didn't like
this requirement.

I tried to add an email[0] to discuss this with hackers, but failed to add
the CC. Let's discuss here instead given my complete inability to manage
mailing lists :).

[0]: https://www.postgresql.org/message-id/CTUJ604ZWHI1.3PFZK152XCWLX%40gonk

--
Tristan Partin
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tristan Partin 2023-07-05 20:55:30 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Previous Message Tristan Partin 2023-07-05 20:45:11 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-07-05 20:55:30 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Previous Message Daniel Gustafsson 2023-07-05 20:45:26 Re: Add PQsendSyncMessage() to libpq