Re: How to insert non-english characters to the db?

From: Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to insert non-english characters to the db?
Date: 2003-09-09 08:05:10
Message-ID: 3F5D89B6.9070408@physik.uni-erlangen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:

>Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de> writes:
>
>
>>initdb --locale=de_DE -E UNICODE (tryed LATIN1 also)
>>FATAL: invalid value for "lc_messages": "de_DE"
>>
>>
>
>
>
>>I'm on a debian/linux box that has many apps with different
>>localisations availabel. Does the newest version PgSQL 7.4beta not have
>>the localisation support jet?
>>
>>
>
>No, your problem is that your OS doesn't have complete support for de_DE
>locale. You will need to pick a supported locale for LC_MESSAGES. I'd
>recommend something along the lines of
>
> export LC_ALL=de_DE
> export LC_MESSAGES=C -- or something else that works
> initdb -E UNICODE
>
>You could try just editing the lc_messages setting in postgresql.conf,
>but I am not sure whether that will be sufficient; the original initdb
>may have suffered internal failures due to the broken locale setting.
>Safest to redo it.
>
> regards, tom lane
>
>
Tryed it out, but the initdb still fails:

$ initdb -E UNICODE --lc-messages=C
The files belonging to this database system will be owned by user "afromm".
This user must also own the server process.

The database cluster will be initialized with locales:
COLLATE: de_DE CTYPE: de_DE MESSAGES: C
MONETARY: de_DE NUMERIC: de_DE TIME: de_DE

fixing permissions on existing directory /home/afromm/devel/pg/data... ok
creating directory /home/afromm/devel/pg/data/base... ok
creating directory /home/afromm/devel/pg/data/global... ok
creating directory /home/afromm/devel/pg/data/pg_xlog... ok
creating directory /home/afromm/devel/pg/data/pg_clog... ok
selecting default shared_buffers... 50
selecting default max_connections... 10
creating configuration files... ok
creating template1 database in /home/afromm/devel/pg/data/base/1... ok
initializing pg_shadow... FATAL: XX000: failed to initialize
lc_messages to ""
LOCATION: InitializeGUCOptions, guc.c:1871

initdb: failed

without the --lc-messages switch I get the same error. Why doesn't
initdb initialize lc_messages, as told, to C rather then ""?

In /etc/locale.gen there is nothing set, but shouldn't I be able to
create a UTF-8-aware DB on a machine that doesn't have localisation
support at all? The problem is that I don't have root access to this
machine.

--
Andreas Fromm

-----------------------------
Drink wet cement...
... and get stoned

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tomka Gergely 2003-09-09 08:23:42 Re: How to insert non-english characters to the db?
Previous Message Tomka Gergely 2003-09-09 06:00:17 Re: How to insert non-english characters to the db?