Re: Windows default locale vs initdb - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Windows default locale vs initdb
Date
Msg-id CA+hUKGK3zubzq_JZ8MU=zzjOLKKgdq_Knyf_Bra042nqj8gf3g@mail.gmail.com
Whole thread Raw
In response to Re: Windows default locale vs initdb  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Windows default locale vs initdb
List pgsql-hackers
On Tue, Jul 19, 2022 at 10:58 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> Here's a patch.

I added this to the next commitfest, and cfbot promptly told me about
some warnings I needed to fix.  That'll teach me to post a patch
tested with "ci-os-only: windows".  Looking more closely at some error
messages that report GetLastError() where I'd mixed up %d and %lu, I
see also that I didn't quite follow existing conventions for wording
when reporting Windows error numbers, so I fixed that too.

In the "startcreate" step on CI you can see that it says:

The database cluster will be initialized with locale "en-US".
The default database encoding has accordingly been set to "WIN1252".
The default text search configuration will be set to "english".

As for whether "accordingly" still applies, by the logic of of
win32_langinfo()...  Windows still considers WIN1252 to be the default
ANSI code page for "en-US", though it'd work with UTF-8 too.  I'm not
sure what to make of that.  The goal here was to give Windows users
good defaults, but WIN1252 is probably not what most people actually
want.  Hmph.

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Doc about how to set max_wal_senders when setting minimal wal_level
Next
From: "David G. Johnston"
Date:
Subject: Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml