Thread: Locale for Error Messages
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