Search Postgresql Archives

Re: how to specify the locale that psql uses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
I had given reply abt windows

 


From: Shoaib Mir <shoaibmir@xxxxxxxxx>
To: Dhaval Jaiswal <bablu_postgres@xxxxxxxxx>
Cc: Kent Tong <kent@xxxxxxxxxxxx>; pgsql-general@xxxxxxxxxxxxxx
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@xxxxxxxxx> 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/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux