initdb.exe changes --locale option - Mailing list pgsql-bugs

From Mike Toews
Subject initdb.exe changes --locale option
Date
Msg-id CAM2FmMoeykXx2-XqJTtEmTcW9y9MSecbUrdN+jy7vvg_MfdPcg@mail.gmail.com
Whole thread Raw
Responses Re: initdb.exe changes --locale option  (Mike Toews <mwtoews@gmail.com>)
Re: initdb.exe changes --locale option  (Dave Page <dpage@pgadmin.org>)
List pgsql-bugs
I'm using the "postgresql-9.2.0-1-windows.exe" installer, from
Enterprise DB, on a Windows Vista 32-bit computer.

The issue was noticed with the GUI installer, where I chose the local
option "English, New Zealand" from a drop-down menu, but the resulting
database cluster has "English_United States.1252".

With initdb.exe, I see that --locale has unexpected behaviour. I'll
present a few examples that each represent key : value, where key is
set with --local="key" and value is from the output: The database
cluster will be initialized with locale "value".

C : C
English : English_United States.1252
French : French_France.1252
nonsense : English_United Kingdom.1252
French, Canada : French_France.1252
French_Canada : French_Canada.1252
English, Canada : English_United States.1252
English_New_Zealand : English_United Kingdom.1252
English, New Zealand : English_United States.1252
English_New Zealand : English_New Zealand.1252

There are some interesting interpretations in the above, but I
understand they probably depend on the OS (Windows Vista, in this
case). In the install-postgresql.log file I see attempts to get a list
of available system locales:


Executing C:\Users\mwtoews\AppData\Local\Temp\postgresql_installer\getlocales.exe
Script exit code: 0

Script output:
 AfrikaansxxCOMMAxxxxSPxxSouthxxSPxxAfrica=Afrikaans, South Africa
AlbanianxxCOMMAxxxxSPxxAlbania=Albanian, Albania
...
EnglishxxCOMMAxxxxSPxxCanada=English, Canada
...
EnglishxxCOMMAxxxxSPxxNewxxSPxxZealand=English, New Zealand
...
EnglishxxCOMMAxxxxSPxxUnitedxxSPxxKingdom=English, United Kingdom
EnglishxxCOMMAxxxxSPxxUnitedxxSPxxStates=English, United States
...
FrenchxxCOMMAxxxxSPxxCanada=French, Canada
FrenchxxCOMMAxxxxSPxxFrance=French, France


where it appears that the value after "=" is used to populate the
drop-down menu.

-Mike

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7528: Spurious empty log file created
Next
From: Mike Toews
Date:
Subject: Re: initdb.exe changes --locale option