Friday 22 January 2010

PostgreSQL error (FATAL: invalid value for parameter “lc_monetary”: “en_US”)

Hi ,

If u get some error like this after installing postgresql

(Note m using a ubuntu Linux )

* Restarting PostgreSQL 8.1 database server * The PostgreSQL server failed to start. Please check the log output:
FATAL: invalid value for parameter “lc_monetary”: “en_US” [fail]
Check which locales u are using.

for a unix system u can check it with this command

root@mail:/home/devenix# locale

Output wat i got is

LANG=en_US.UTF-8
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=”en_US.UTF-8″
LC_NAME=”en_US.UTF-8″
LC_ADDRESS=”en_US.UTF-8″
LC_TELEPHONE=”en_US.UTF-8″
LC_MEASUREMENT=”en_US.UTF-8″
LC_IDENTIFICATION=”en_US.UTF-8″
LC_ALL=

so with this u got wat locale u are using

after that copy the locale and paste in ur postgresql config file at defined locations

File Path: /etc/postgresql/8.1/main/postgresql.conf

change following entries with the locale wat u got

lc_messages = ‘en_US.UTF-8′ # locale for system error message
# strings
lc_monetary = ‘en_US.UTF-8′ # locale for monetary formatting
lc_numeric = ‘en_US.UTF-8′ # locale for number formatting
lc_time = ‘en_US.UTF-8′

and restart postgresql and check .

You can visit my second blog : devenix.wordpress.com

No comments:

Post a Comment