Re: plpgsql is not translate-aware

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: plpgsql is not translate-aware
Date: 2008-09-16 02:40:33
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> Can't we give it its own text domain? It seems fundamentally wrong
>> for a plug-in language to require core support for its messages.

> Another idea would be to redefine errmsg() and friends within the
> plpgsql sources, but that seems worse because every other library will
> need to do the same.

> Refinement of the previous idea: maybe we can add a compiler flag, to be
> set in Makefiles, that defines the domain and passes it down to

It seems like something like that could work. I'd be inclined to change
the ereport() macro itself, not errmsg/errdetail/etc. The domain name
could be passed in at ereport and then used when evaluating the

A possible problem is that some places use _() (ie, gettext) directly
instead of leaving it to the elog.c code to apply translation. But I
suppose we might be able to redefine _() too.

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2008-09-16 04:10:32 Add default_val to pg_settings
Previous Message ITAGAKI Takahiro 2008-09-16 01:56:29 Re: NDirectFileRead and Write