Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012 - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012
Date
Msg-id CA+hUKGJacQm3y20tCkh6D4_3h17DhZWmnc+CqA_PCwT+D8LgkA@mail.gmail.com
Whole thread Raw
In response to AW: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012  ("ROSESOFT S. Hoffmann" <sh@rosesoft.de>)
Responses Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012
List pgsql-bugs
On Mon, Jul 4, 2022 at 11:53 PM ROSESOFT S. Hoffmann <sh@rosesoft.de> wrote:
> On Windows Server 2016/2019/2022 and Windows 10/11 the ICU-Options work as expected!
> Why does the problem only occurs on Windows Server 2012?

Windows 10 and later contain a copy of ICU inside them.  That's why
strings like "de", "de-CH" etc work there: PostgreSQL is using the
normal Windows collation API (it's a bit weird that we call it "libc"
mode, when it's not exactly libc, but what we mean by that is the OS's
native collations...).  So I think it is probably Windows' internal
copy of ICU that receives that name "de-..." and ignores the trailing
part that it doesn't understand.

That has nothing to do with PostgreSQL's ICU support!  Somewhat confusingly.

Windows 10 and later still understand those names like
"German_Germany.1252" as well.  It seems to be a very bad idea to use
them in PostgreSQL, and I'm hoping that we'll soon stop choosing those
old style names by default at initdb time in PG16, which will probably
also be the first version that can't run on Windows Server 2012.



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error
Next
From: Thomas Munro
Date:
Subject: Re: PostgreSQL 10 initdb with locale de-x-icu fails on Windows Server 2012