Re: how to specify the locale that psql uses - Mailing list pgsql-general

From Dhaval Jaiswal
Subject Re: how to specify the locale that psql uses
Date
Msg-id 250447.30785.qm@web111207.mail.gq1.yahoo.com
Whole thread Raw
In response to Re: how to specify the locale that psql uses  (Shoaib Mir <shoaibmir@gmail.com>)
List pgsql-general
 
 
I had given reply abt windows

 


From: Shoaib Mir <shoaibmir@gmail.com>
To: Dhaval Jaiswal <bablu_postgres@yahoo.com>
Cc: Kent Tong <kent@cpttm.org.mo>; pgsql-general@postgresql.org
Sent: Friday, March 27, 2009 4:47:43 AM
Subject: Re: [GENERAL] how to specify the locale that psql uses

On Fri, Mar 27, 2009 at 9:35 AM, Dhaval Jaiswal <bablu_postgres@yahoo.com> wrote:
 
 
When you install postgreSQL over XP at the same time it asks for encoding & locale.
Set at the same time. Follow the below link will give you more idea.
 
http://www.postgresql.org/docs/7.2/static/multibyte.html


Please updates yourself with the latest version as its 8.3.7 these days and you are still like years and years behind with version 7.2 documentation :)
 
 
 
If you want to change the locale of existing database. You can't.
The workaround for that you can create another cluster with initdb command with supported locale.
 

I dont think so the person asking the question ever asked for changing encoding for the database. Please make sure to read the question atleast, as it was about changing locale for psql.

In order to do that

For server messages:
-------------------------------

set the configuration parameter "lc_messages" to a value you like to have for getting messages back from server.

It can done in both ways, for the session and permanently.

In order to do for a session use:

set lc_message = ....

and otherwise set it in your postgresql.conf file and reload.

For Client messages:
-----------------------------
 
For client programs like psql, change the current locale where you are starting up psql. I am not sure about windows but in Linux you can do this by setting LANG environment variable.


--
Shoaib Mir
http://shoaibmir.wordpress.com/

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Is there a meaningful benchmark?
Next
From: Dhaval Jaiswal
Date:
Subject: Re: Installation Error, Server Won't Start