public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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, 5 Jun 2025 17:40:04 +0200
Message-ID: <CAFCRh-8KoLDppV0K21rLZc=dR9_hgvzgoYf=g5PszbARKZ9RjQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAFCRh--J-Ra-Y73utj9SN4koJnucAH9+7eOY4Ya-av1wtv3pqg@mail.gmail.com>
	<[email protected]>

On Thu, Jun 5, 2025 at 5:01 PM Daniel Verite <[email protected]> wrote:
>         Dominique Devienne wrote:
> > >  locale 'C.UTF-8' or lc_collate 'C.UTF-8' lc_ctype 'C.UTF-8'
> > > cannot work on Windows because Windows does not have a locale
> > > named C.UTF-8, whereas a Linux system does (well at least recent
> > > Linuxes. Some old Linuxes don't).
> >
> > But isn't the point of the new-in-v17 builtin provider is to be system
> > independent???
>
> Yes, definitely.
>
> But suppose your database has an extension that calls local-dependent
> code, such as strxfrm() [1] for instance.
>
> The linked MSVC doc says:
>
>  "The transformation is made using the locale's LC_COLLATE category
>  setting. For more information on LC_COLLATE, see setlocale. strxfrm
>  uses the current locale for its locale-dependent behavior"
>
> But what will be the value in LC_COLLATE when this extension code
> is running in a database using the builtin provider?
> It's the value found in pg_database.datcollate that was specified
> when creating the database with the lc_collate or locale option.
>
> The builtin provider routines are used for code inside Postgres
> core, but code outside its perimeter can still call libc functions
> that depend on lc_collate and lc_ctype.

So you're saying datcollate and datctype from pg_database are
irrelevant to PostgreSQL itself, and only extensions might be affects?

Which implies that I shouldn't worry about those differences?
Am I reading you right? --DD






view thread (2+ 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]
  Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server
  In-Reply-To: <CAFCRh-8KoLDppV0K21rLZc=dR9_hgvzgoYf=g5PszbARKZ9RjQ@mail.gmail.com>

* 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