Locale for Error Messages

From: "George Sexton" <georges(at)mhsoftware(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Locale for Error Messages
Date: 2011-09-11 16:13:54
Message-ID: 003301cc709d$ce051e00$6a0f5a00$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2011-09-11 16:49:06 Re: Security setup.
Previous Message Mudit Mishra 2011-09-11 14:37:55 writing block 6850 of relation 1663/17231/1259