public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Davis <[email protected]>
To: Dominique Devienne <[email protected]>
To: Daniel Verite <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server
Date: Thu, 05 Jun 2025 14:53:20 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFCRh--J-Ra-Y73utj9SN4koJnucAH9+7eOY4Ya-av1wtv3pqg@mail.gmail.com>
References: <CAFCRh--iJ4MT2exvXnvRPum+7su3Jn9qmnBQqxWsAtyEyEo83A@mail.gmail.com>
	<[email protected]>
	<CAFCRh--J-Ra-Y73utj9SN4koJnucAH9+7eOY4Ya-av1wtv3pqg@mail.gmail.com>

On Thu, 2025-06-05 at 15:07 +0200, Dominique Devienne wrote:
> But isn't the point of the new-in-v17 builtin provider is to be
> system
> independent???

Yes, a major part of the builtin provider is complete consistency
across platforms for the entire collation system -- anything affected
by the database default collation or a COLLATE clause, including
comparisons, casing behavior, pattern matching, etc. New major
versionsĀ of Postgres may update Unicode, but those updates will never
affect comparisons in the builtin C.UTF-8 locale; and will only affect
other behaviors (like casing) subject to the (rather strict) Unicode
stability policy[1].

Regarding datcollate and datctype: those affect the LC_COLLATE and
LC_CTYPE environment variables, and Postgres does a setlocale() upon a
new database connection. That only affects libc functions like
strcoll(), so it won't affect the builtin provider or ICU which don't
use strcoll().

You're right to ask why those matter at all, then. It's hard for me to
guarantee that datcollate/datctype won't affect some other part of the
system or an extension (I see that Daniel offered some more details).
I'd like to force LC_COLLATE=C and LC_CTYPE=C, and then there'd be no
question, but I won't promise when that will happen. I'd suggest just
forcing those to "C" in your database.

Regards,
	Jeff Davis

[1] https://www.unicode.org/policies/stability_policy.html






view thread (8+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox