On Wed, 2026-08-05 at 12:55 +0000, Zwettler Markus (OIZ) wrote:
> I'm creating a PG cluster with Swiss High German ICU locales.
> 
> I wonder why “collate = C” and “ctype = C” is shown?
>  
> initdb --locale-provider=icu --icu-locale=de-CH-x-icu -D /path/to/datainitdb
>  
> CREATE DATABASE eng001
>   WITH
>   OWNER = dbowner
>   ENCODING = 'UTF8'
>   LOCALE_PROVIDER = 'icu'
>   ICU_LOCALE = 'de-CH-x-icu'
>   ;

That's because you didn't specify a C library locale, so "initdb" took the
setting from your shell environment.

Try:

  initdb --locale-provider=icu --icu-locale=de-CH --locale=de_CH.utf8 -D 
/path/to/datainitdb

Many aspects of the locale are still taken from the C library.  It's mostly the
collations that will be taken from ICU.

Yours,
Laurenz Albe


Reply via email to