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?