Re: translating exception messages of postgresql functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux