Re: ICU database?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "Zwettler Markus (OIZ)" <markus(dot)zwettler(at)zuerich(dot)ch>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: ICU database?
Date: 2026-08-06 06:24:33
Message-ID: 8a48b2b9efb16c38c12801c935e462badac0a491.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

  • ICU database? at 2026-08-05 12:55:19 from Zwettler Markus (OIZ)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2026-08-06 13:46:01 Re: ICU database?
Previous Message Zwettler Markus (OIZ) 2026-08-05 15:01:58 AW: AW: [Extern] Re: ICU database?