Re: BUG #4038: Problem with locale changing by initdb

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: Alexey <_Kpot_(at)sibmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4038: Problem with locale changing by initdb
Date: 2008-03-16 07:49:35
Message-ID: 65937bea0803160049i49c2c886h669237613fa9b84d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Mar 15, 2008 at 6:06 PM, Alexey <_Kpot_(at)sibmail(dot)com> wrote:

>
> The following bug has been logged online:
>
> Bug reference: 4038
> Logged by: Alexey
> Email address: _Kpot_(at)sibmail(dot)com
> PostgreSQL version: 8.2.5
> Operating system: Windows 2003
> Description: Problem with locale changing by initdb
> Details:
>
> I want to change locale of my database to 'Russian_Russia.1251'. I
> executed
> command, according to documentation:
>
> initdb -D E:\Program Files\PostgreSQL\8.2\data
> --locale=Russian_Russia.1251
>
> Then I saw message:
>
> The files belonging to this database system will be owned by user
> "Alexey".
> This user must also own the server process.
> The database cluster will be initialized with locale Russian_Russia.1251.

<error_output>

> initdb: directory "Files/PostgreSQL/8.2/data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "Files/PostgreSQL/8.2/data" or run initdb
> with an argument other than "Files/PostgreSQL/8.2/data".

</error_output>

The above error messages show that you tried to create a database in a
directory that was not empty.

>
>
> After I saw values of parameters lc_collate and lc_ctype, and they were
> 'C',
> but not 'Russian_Russia.1251'
>
> Did I somethin wrong?
>

You seem to assume that the above command succeeded. Your INITDB did not
succeed; the locales you are seeing are from the preexisting database.
Either create a new directory for the new database, or empty the older
directory.

One more (important) thing. You should use quotes for the -D parameter,
since your directory path has space, like so:

initdb -D "E:\Program Files\PostgreSQL\8.2\data"
--locale=Russian_Russia.1251

HTH

Best regards,
--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad *
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco

http://gurjeet.frihost.net

Mail sent from my BlackLaptop device

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2008-03-16 20:59:38 win installer 8.3 doesn't recognice ActiveTCL8.5
Previous Message Alvaro Herrera 2008-03-16 03:29:33 Re: BUG #4037: Manual bug: 2.5. Querying a Table