Re: LOCALE C.UTF-8 on EDB Windows v17 server - Mailing list pgsql-general

From Dominique Devienne
Subject Re: LOCALE C.UTF-8 on EDB Windows v17 server
Date
Msg-id CAFCRh--zj2brnZwGPc3LL59EORgMT0pHRt82HfH6jPRszumpvg@mail.gmail.com
Whole thread Raw
In response to Re: LOCALE C.UTF-8 on EDB Windows v17 server  (Dominique Devienne <ddevienne@gmail.com>)
Responses Re: LOCALE C.UTF-8 on EDB Windows v17 server
List pgsql-general
On Thu, Jun 5, 2025 at 11:07 AM Dominique Devienne <ddevienne@gmail.com> wrote:
> So... It is possible to have the SAME command on Windows and Linux,
> which yields the SAME datcollate and datctype values???
> So far, such a command eludes me, I'm afraid. --DD

So I tried to be explicit about lc_collate and lc_ctype too.
OK on Linux, KO on Windows...

Windows:
ddevienne=> create database "dd_v168b" encoding 'UTF8' builtin_locale
'C.UTF-8' lc_collate 'C.UTF-8' lc_ctype 'C.UTF-8'
ddevienne-> locale_provider 'builtin' template template0;
ERROR:  invalid LC_COLLATE locale name: "C.UTF-8"
HINT:  If the locale name is specific to ICU, use ICU_LOCALE.

Linux:
ddevienne=> create database "dd_v168c" encoding 'UTF8' builtin_locale
'C.UTF-8' lc_collate 'C.UTF-8' lc_ctype 'C.UTF-8'
ddevienne-> locale_provider 'builtin' template template0;
CREATE DATABASE
ddevienne=> select datlocprovider, datlocale, datcollate, datctype
from pg_database where datname = 'dd_v168c';
 datlocprovider | datlocale | datcollate | datctype
----------------+-----------+------------+----------
 b              | C.UTF-8   | C.UTF-8    | C.UTF-8
(1 row)

AFAIK, C and C.UTF-8 are NOT the same thing, for collations.
It is indeed super confusing Jeff. I'm lost.

How can I get a

datlocprovider | datlocale | datcollate | datctype
----------------+-----------+------------+----------
 b              | C.UTF-8   | C.UTF-8    | C.UTF-8

database on Windows *AND* Linux?
If not possible using the same SQL (but why...), using what SQL?



pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server
Next
From: Laurenz Albe
Date:
Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server