Re: initdb.exe changes --locale option

From: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Mike Toews <mwtoews(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: initdb.exe changes --locale option
Date: 2012-09-14 10:14:53
Message-ID: CANFyU95uonewW83w7qG=1WRMMP7yHMPqwQKJAyZa0rNuhB1XWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

No.. what I mean to say is that the output from getlocales is same in 9.1
and 9.2. (I checked the installation logs). It's initdb in 9.2 that is not
accepting the same output. So, it has nothing to with the VC++ runtimes.

PG9.1:
--
c:\Program Files\PostgreSQL\9.1>bin\initdb.exe" --locale="English, New
Zealand" -D "c:\Program Files\PostgreSQL\9.1\data2"
The files belonging to this database system will be owned by user "edb".
This user must also own the server process.

The database cluster will be initialized with locale English, New Zealand.
<-- OKAY
--

PG9.2:
--
c:\Program Files\PostgreSQL\9.2>bin\initdb.exe --locale="English, New
Zealand" -D "c:\Program Files\PostgreSQL\9.2\data2"
The files belonging to this database system will be owned by user "edb".
This user must also own the server process.

The database cluster will be initialized with locale "English_United
States.1252 <--NOT OKAY
--

Now, on 9.2, if we replace "," with "_" from the locale name, then it
works fine:
c:\Program Files\PostgreSQL\9.2>bin\initdb.exe" --locale="English_New
Zealand" -D "c:\Program Files\PostgreSQL\data"
The files belonging to this database system will be owned by user "edb".
This user must also own the server process.

The database cluster will be initialized with locale "English_New
Zealand.1252". <-- OKAY
--

So, actually it's initdb that has undergone change. Fix in
initdbcluster.vbs so that the locale name is passed with "_" to initdb.exe,
is just a workaround from installer.

On Fri, Sep 14, 2012 at 3:11 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

>
>
> On Friday, September 14, 2012, Sandeep Thakkar wrote:
>
>> I think everything is covered by Mike here. "getlocales.exe" returns the
>> list of locales in the format "Language, Country" for most of them. and
>> this worked fine on 9.1, but does not work on 9.2. And if we are looking
>> for a workaround in installer, then as Mike suggested, we should handle it
>> in initcluster.vbs. (for 9.2.0)
>>
>
> Hmm, thanks Sandeep. So I believe the only thing that changed in this area
> between 9.1 and 9.2 is that we moved from VC++ 2008 to 2010. Can you
> confirm that's the only difference please, and that the output from
> getlocales does differ between versions when run on the same box?
>
> If that's the case, we can do the tweaking of the names there, but only
> when using the newer compiler, if we cannot find a better fix.
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>

--
Sandeep Thakkar
Senior Software Engineer
EnterpriseDB Corporation
The Enterprise Postgres Company
Phone: +91.20.30589514

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Page 2012-09-14 10:54:46 Re: initdb.exe changes --locale option
Previous Message Dave Page 2012-09-14 09:41:03 Re: initdb.exe changes --locale option