Thread: BUG #5134: initdb fails with return code 1

BUG #5134: initdb fails with return code 1

From
"Savita"
Date:
The following bug has been logged online:

Bug reference:      5134
Logged by:          Savita
Email address:      savita.halli@gmail.com
PostgreSQL version: 8.3.5
Operating system:   AIX HP
Description:        initdb fails with return code 1
Details:

Hi

We have written the script to create the postgres database. Now the initdb
fails with return code 1.

The locale of the system is Ja_JP (AIX). I am getting the similar error in
HP of locale ja_JP.SJIS.

With error I could make out that initdb is unable to determine the encoding
for these locale.

I am pasting the error I am getting


The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale Ja_JP.
could not determine encoding for locale "Ja_JP": codeset is "IBM-943"
initdb: could not find suitable encoding for locale Ja_JP
Rerun initdb with the -E option.
Try "initdb --help" for more information.
1
Execute initdb failed!. Exiting installation .......


Could you please let me know how I can resolve this?

Thanks in advance
Savita

Re: BUG #5134: initdb fails with return code 1

From
Tom Lane
Date:
"Savita" <savita.halli@gmail.com> writes:
> could not determine encoding for locale "Ja_JP": codeset is "IBM-943"

Hmph.  Do you know which of Postgres' character set encodings that
corresponds to?  If there is one, fixing this is just a matter of
adding an entry to the table in src/port/chklocale.c.

Some googling suggests that this might be SJIS or a close relative,
in which case adding it to the table won't do much except generate
a more helpful error message: we do not support SJIS as a database
encoding, only as a client encoding.  In that case the answer is
you need to pick a locale that uses a supported encoding, such as
UTF8.

            regards, tom lane