Locale for Error Messages - Mailing list pgsql-general

From George Sexton
Subject Locale for Error Messages
Date
Msg-id 003301cc709d$ce051e00$6a0f5a00$@com
Whole thread Raw
List pgsql-general

I run a SAS application that uses PostgreSQL. I’m working on enhancing my support for other languages. One of the things I noticed is that I’m getting my errors (say a unique key constraint) in English. This is expected. I know I’m not doing anything to change the locale.

 

I’d like to figure out how to get the errors in the user’s locale. I’m using JDBC to talk to the DB.

 

I looked at the documentation for localization and it appears that the locale for messages can be set for the database instance at startup by setting the LC_MESSAGES environment variable. I don’t want to have a different database instance for each language. Really, I’d just like a way of setting the locale prior to making a statement call.

 

I’ve looked at the SET command and the documentation for lc_messages(string) in section 18.10 of the manual and this doesn’t work because it requires Super User.

 

Is there a way to make this work? If not, is there an enhancement request queue I should submit this to?

 

                                      

George Sexton

MH Software, Inc.

303 438-9585

www.mhsoftware.com

 

pgsql-general by date:

Previous
From: Mudit Mishra
Date:
Subject: writing block 6850 of relation 1663/17231/1259
Next
From: Chris Travers
Date:
Subject: Re: Security setup.