pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Remaining dependency on setlocale()
Date: Wed, 12 Nov 2025 10:59:35 -0800
Message-ID: <68c4928b1ad1fdda96511a4e22d9c8fbd9eb95e8.camel@j-davis.com> (raw)
In-Reply-To: <215d5fa1-49c7-487c-a6be-e772c0b46805@eisentraut.org>
References: <5e709c7a-0504-426c-8a7d-e0701c334cd7@manitou-mail.org>
	<215d5fa1-49c7-487c-a6be-e772c0b46805@eisentraut.org>

On Wed, 2025-11-12 at 19:41 +0100, Peter Eisentraut wrote:
> The impact area of LC_CTYPE is much larger and more complicated 
> and possibly interacts with other settings and third-party libraries
> in 
> ways that we don't understand yet and might not be able to change. 
> That's why I'm more hesitant about it.

What do you think about making lc_ctype and/or lc_collate into GUCs
(like lc_messages), assuming we remove all known effects in the backend
first?

If we make the setting PGC_POSTMASTER, then it eliminates potential
problems with threading, because setlocale() would be called only once
before allowing connections. For platforms that support uselocale(), we
could allow it to be set more freely, for those who need it set to
different values in different backends.

It would also be easier to document, which would be nice. There could
be some confusion if various settings are inconsistent with each other,
but that's true currently. And we'd still enforce a ctype that's
consistent with the encoding, at least.

Regards,
	Jeff Davis






view thread (96+ messages)  latest in thread

Message-ID: <68c4928b1ad1fdda96511a4e22d9c8fbd9eb95e8.camel@j-davis.com>
Permalink:  ../68c4928b1ad1fdda96511a4e22d9c8fbd9eb95e8.camel@j-davis.com/
Also on:    postgresql.org/message-id/68c4928b1ad1fdda96511a4e22d9c8fbd9eb95e8.camel@j-davis.com

 · 

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-hackers@postgresql.org
  Cc: pgsql@j-davis.com, peter@eisentraut.org, daniel@manitou-mail.org, thomas.munro@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Remaining dependency on setlocale()
  In-Reply-To: <68c4928b1ad1fdda96511a4e22d9c8fbd9eb95e8.camel@j-davis.com>

* 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