Re: LOCALE C.UTF-8 on EDB Windows v17 server

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LOCALE C.UTF-8 on EDB Windows v17 server
Date: 2025-06-05 09:34:48
Message-ID: CAFCRh--zj2brnZwGPc3LL59EORgMT0pHRt82HfH6jPRszumpvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 5, 2025 at 11:07 AM Dominique Devienne <ddevienne(at)gmail(dot)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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-06-05 11:40:49 Re: LOCALE C.UTF-8 on EDB Windows v17 server
Previous Message Dominique Devienne 2025-06-05 09:07:14 Re: LOCALE C.UTF-8 on EDB Windows v17 server