From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julius Tuskenis <julius@nsoft.lt>
Cc: pgsql-admin@postgresql.org
Subject: Re: translating exception messages of postgresql functions
Date: Wed, 14 May 2008 12:41:37 -0400
Message-ID: <20080514164137.GC9838@alvh.no-ip.org> (raw)
In-Reply-To: <20999.1210782739@sss.pgh.pa.us>
References: <482AF7F7.5090309@nsoft.lt>
<20080514144627.GD5521@alvh.no-ip.org>
<482B03B0.8060206@nsoft.lt>
<20080514153337.GI5521@alvh.no-ip.org>
<482B09DE.1040601@nsoft.lt>
<20999.1210782739@sss.pgh.pa.us>
Tom Lane wrote:
> I wonder if it would help to make plpgsql pass the RAISE format string
> through gettext?
Hmm, nice idea. However,
> This would only be a usable approach if there were some fairly easy way
> to add installation-specific translations to gettext's table. I don't
> know enough about gettext to know if that's doable.
There are lots of caveats -- the first being that you would need to
extract the messages from the function body. I don't think there's a
gettext PL/pgSQL parser, so there's a first hurdle there.
Then there's the matter of not mixing the "postgres" message domain with
the user's, so we would need to change it just before calling RAISE and
restore it afterwards.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, julius@nsoft.lt
Subject: Re: translating exception messages of postgresql functions
In-Reply-To: <20080514164137.GC9838@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox