Re: beta2, I can't set UTF-8 for czech locales on win

Lists: pgsql-hackers
From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: "Dave Page" <dpage(at)postgresql(dot)org>
Subject: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-01 16:30:43
Message-ID: 162867790711010930j4f9bcb09k6640cd223ef6b652@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello

I would to initdb with UTF8 encoding. But after installation, I had
cp1250 encoding

lc_collate | Czech_Czech Republic.1250
he collation order locale.
lc_ctype | Czech_Czech Republic.1250
he character classification and case conversion locale.
lc_messages | Czech_Czech Republic
e language in which messages are displayed.
lc_monetary | Czech_Czech Republic

Installation protocol is on http://www.pgsql.cz/data/postgresql-8.3-beta2.zip

When I try manually rebuild cluster I had second problem:

C:\PostgreSQL\bin>initdb -D ../data
The program "postgres" is needed by initdb but was not found in the
same directory as "C:\PostgreSQL\bin/initdb".
Check your installation.

but:
29.10.2007 10:24 69 632 clusterdb.exe
29.10.2007 10:24 69 632 createdb.exe
29.10.2007 10:24 61 440 createlang.exe
29.10.2007 10:24 73 728 createuser.exe
29.10.2007 10:24 56 320 dropdb.exe
29.10.2007 10:24 62 976 droplang.exe
29.10.2007 10:24 56 320 dropuser.exe
29.10.2007 10:08 106 496 initdb.exe
29.10.2007 10:25 30 208 oid2name.exe
19.10.2007 13:24 9 314 304 pgAdmin3.exe
19.10.2007 13:18 700 416 pgAgent.exe
29.10.2007 10:25 61 440 pgbench.exe
29.10.2007 10:08 38 912 pg_config.exe
29.10.2007 10:08 39 424 pg_controldata.exe
29.10.2007 10:23 65 536 pg_ctl.exe
29.10.2007 10:23 262 144 pg_dump.exe
29.10.2007 10:24 143 360 pg_dumpall.exe
29.10.2007 10:09 53 248 pg_resetxlog.exe
29.10.2007 10:24 131 072 pg_restore.exe
29.10.2007 10:10 34 304 pg_standby.exe
29.10.2007 10:23 4 009 984 postgres.exe
29.10.2007 10:23 299 008 psql.exe
29.10.2007 10:24 69 632 reindexdb.exe
15.10.2007 08:28 1 400 832 StackBuilder.exe
29.10.2007 10:24 43 008 vacuumdb.exe
29.10.2007 10:26 28 672 vacuumlo.exe
26 File(s) 17 282 048 bytes
0 Dir(s) 507 240 448 bytes free

What I did wrong?

Regards
Pave Stehule


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Dave Page" <dpage(at)postgresql(dot)org>
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-01 18:30:24
Message-ID: 9708.1193941824@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> When I try manually rebuild cluster I had second problem:

> C:\PostgreSQL\bin>initdb -D ../data
> The program "postgres" is needed by initdb but was not found in the
> same directory as "C:\PostgreSQL\bin/initdb".
> Check your installation.

Do you have the same problem previously reported that "postgres -V"
doesn't work? If so, maybe taking out libxml2 will help?

regards, tom lane


From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Dave Page" <dpage(at)postgresql(dot)org>
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-01 20:57:27
Message-ID: 162867790711011357j278dc292m68c18c9cb763450e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/11/2007, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> > When I try manually rebuild cluster I had second problem:
>
> > C:\PostgreSQL\bin>initdb -D ../data
> > The program "postgres" is needed by initdb but was not found in the
> > same directory as "C:\PostgreSQL\bin/initdb".
> > Check your installation.
>
> Do you have the same problem previously reported that "postgres -V"
> doesn't work? If so, maybe taking out libxml2 will help?
>
> regards, tom lane
>
No, it is different problem. It was my beginner mistake :(. I run
initdb as Administrator. It needs maybe some hint message. With runas
initdb works.

It was false alarm. I am sorry. All is correct. Misunderstanding is
from name of czech locales, that is same for utf8 and 1250 encoding.
So I tested it, and it looks well.

Regards
Pavel Stehule


From: bruno(dot)gaudin(at)gmail(dot)com
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-02 17:24:18
Message-ID: 1194024258.381586.187860@d55g2000hsg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 1 nov, 19:30, t(dot)(dot)(dot)(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
> "Pavel Stehule" <pavel(dot)steh(dot)(dot)(dot)(at)gmail(dot)com> writes:
> > When I try manually rebuild cluster I had second problem:
> > C:\PostgreSQL\bin>initdb -D ../data
> > The program "postgres" isneededbyinitdbbutwas not found in the
> > same directory as "C:\PostgreSQL\bin/initdb".
> > Check your installation.
>
> Do you have the same problem previously reported that "postgres -V"
> doesn't work? If so, maybe taking out libxml2 will help?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

Exactly same problem !! I use postgres V 8.2.4 on windows vista.
Have you found a response since ?


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)postgresql(dot)org>
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-02 18:46:16
Message-ID: 20071102184616.GD2460@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Pavel Stehule wrote:
> On 01/11/2007, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> > > When I try manually rebuild cluster I had second problem:
> >
> > > C:\PostgreSQL\bin>initdb -D ../data
> > > The program "postgres" is needed by initdb but was not found in the
> > > same directory as "C:\PostgreSQL\bin/initdb".
> > > Check your installation.
> >
> > Do you have the same problem previously reported that "postgres -V"
> > doesn't work? If so, maybe taking out libxml2 will help?

> No, it is different problem. It was my beginner mistake :(. I run
> initdb as Administrator. It needs maybe some hint message. With runas
> initdb works.

IMHO we should check for an Administrator user and reject it
explicitely. The error message is way too obscure.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "bruno(dot)gaudin(at)gmail(dot)com" <bruno(dot)gaudin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-02 19:05:56
Message-ID: 162867790711021205w68215b42yafa2137e4edc6fab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 02/11/2007, bruno(dot)gaudin(at)gmail(dot)com <bruno(dot)gaudin(at)gmail(dot)com> wrote:
> On 1 nov, 19:30, t(dot)(dot)(dot)(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
> > "Pavel Stehule" <pavel(dot)steh(dot)(dot)(dot)(at)gmail(dot)com> writes:
> > > When I try manually rebuild cluster I had second problem:
> > > C:\PostgreSQL\bin>initdb -D ../data
> > > The program "postgres" isneededbyinitdbbutwas not found in the
> > > same directory as "C:\PostgreSQL\bin/initdb".
> > > Check your installation.
> >
> > Do you have the same problem previously reported that "postgres -V"
> > doesn't work? If so, maybe taking out libxml2 will help?
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Have you searched our list archives?
> >
> > http://archives.postgresql.org
>
> Exactly same problem !! I use postgres V 8.2.4 on windows vista.
> Have you found a response since ?
>
>
>
use runas and run initdb as user postgres

Regards
Pavel Stehule


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "bruno(dot)gaudin(at)gmail(dot)com" <bruno(dot)gaudin(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-02 19:44:58
Message-ID: 22463.1194032698@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> On 02/11/2007, bruno(dot)gaudin(at)gmail(dot)com <bruno(dot)gaudin(at)gmail(dot)com> wrote:
>> Exactly same problem !! I use postgres V 8.2.4 on windows vista.
>> Have you found a response since ?
>>
> use runas and run initdb as user postgres

Doesn't sound like that will fix it. The root check doesn't happen until
after we check for -V (look in backend/main/main.c). Whatever libxml2
is doing to break things must be something that affects the earlier
steps in main() ... and there aren't that many. Maybe it's a locale
thing? Anyway I think someone has to reproduce this under a debugger
on Windows to find out where it's failing.

regards, tom lane


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)postgresql(dot)org>
Subject: Re: beta2, I can't set UTF-8 for czech locales on win
Date: 2007-11-03 08:19:06
Message-ID: 472C2EFA.80507@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Pavel Stehule wrote:
>> On 01/11/2007, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>>>> When I try manually rebuild cluster I had second problem:
>>>> C:\PostgreSQL\bin>initdb -D ../data
>>>> The program "postgres" is needed by initdb but was not found in the
>>>> same directory as "C:\PostgreSQL\bin/initdb".
>>>> Check your installation.
>>> Do you have the same problem previously reported that "postgres -V"
>>> doesn't work? If so, maybe taking out libxml2 will help?
>
>> No, it is different problem. It was my beginner mistake :(. I run
>> initdb as Administrator. It needs maybe some hint message. With runas
>> initdb works.
>
> IMHO we should check for an Administrator user and reject it
> explicitely. The error message is way too obscure.

We used to do that, and got a lot more complaints then... Note that
running initdb as administrator works in the vast majority of cases.
It's only if you have some permissions that means you access a file only
using the Administrators or PowerUsers group that it fails (because we
drop those permissions)

//Magnus