initdb.exe changes --locale option

From: Mike Toews <mwtoews(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: initdb.exe changes --locale option
Date: 2012-09-10 22:07:29
Message-ID: CAM2FmMoeykXx2-XqJTtEmTcW9y9MSecbUrdN+jy7vvg_MfdPcg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mike Toews 2012-09-10 22:36:17 Re: initdb.exe changes --locale option
Previous Message mwtoews 2012-09-10 20:40:12 BUG #7530: initdb.exe ignores --locale option, uses "English_United States.1252"