Alvaro Herrera <[EMAIL PROTECTED]> 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
> EVALUATE_MESSAGE.

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
messages.

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to