pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tristan Partin <tristan@neon.tech>
To: Tristan Partin <tristan@neon.tech>
To: joe@cd
To: Heikki Linnakangas <hlinnaka@iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: gdo@leader.it
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Date: Wed, 05 Jul 2023 15:53:16 -0500
Message-ID: <CTUJC778UCIW.28QKG8IC14KCO@gonk> (raw)
In-Reply-To: <CTSM7EZZMY12.1F7GV7Y2KPBBD@gonk>
References: <17946-3e84cb577e9551c3@postgresql.org>
	<1564676.1685043220@sss.pgh.pa.us>
	<555bb26e-c27c-ab65-028f-3fd5b82df9de@iki.fi>
	<CTPMCSM9UB07.3CUPU2JW4BBZ6@gonk>
	<1645ebad-798f-87ad-43ac-72d2bf14d2d6@cd>
	<CTSM7EZZMY12.1F7GV7Y2KPBBD@gonk>

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)





view thread (38+ messages)  latest in thread

Message-ID: <CTUJC778UCIW.28QKG8IC14KCO@gonk>
Permalink:  ../CTUJC778UCIW.28QKG8IC14KCO@gonk/
Also on:    postgresql.org/message-id/CTUJC778UCIW.28QKG8IC14KCO@gonk

 · 

reply

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-bugs@postgresql.org
  Cc: tristan@neon.tech, joe@cd, hlinnaka@iki.fi, tgl@sss.pgh.pa.us, gdo@leader.it, pgsql-hackers@postgresql.org
  Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
  In-Reply-To: <CTUJC778UCIW.28QKG8IC14KCO@gonk>

* 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