Re: Identifying a message in emit_log_hook.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, David Steele <david(at)pgmasters(dot)net>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Pavel Stěhule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Identifying a message in emit_log_hook.
Date: 2016-03-10 12:26:23
Message-ID: CANP8+jJ6Ec6sY_TE0Y2tMvB9kreWzTn+m6W1CnoVjQKtpjvTDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25 February 2016 at 07:42, Kyotaro HORIGUCHI <
horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:

> Hello,
>
> At Wed, 17 Feb 2016 09:13:01 +0000, Simon Riggs <simon(at)2ndQuadrant(dot)com>
> wrote in <
> CANP8+jLbGE_YbxULgZXvce44oOB8V0T93e5_inHvBDE2PXkSOw(at)mail(dot)gmail(dot)com>
> > On 17 February 2016 at 08:34, Kyotaro HORIGUCHI <
> > horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> >
> > >
> > > > I'm guessing this would require making the pre-translated error text
> > > > available to plugins as well as translated form.
> > >
> > > If I understand you correctly, edata->messgage_id in my patch is
> > > just what offers the pre-translated error text to plugins.
> >
> >
> > OK, now I understand the patch, I am happy to apply it.
>
> Thank you very much. I have one concern about this patch.
>
> I have added an id only for .message in the patch but it
> theoretically can apply to all other message typs eventually
> given to gettext() in two macros EVALUATE_MESSAGE(_PLURAL). They
> are detail, detail_log, hint and context and the modification
> could be limited within the two macros by doing so but extra four
> *_id members are to be added to ErrorData. I doubt it is useful
> for the extra members.
>
> If you agree with this, it doesn't seem to me to need more
> modification. Is there anything else to do?

David,

Can you add this to the CF? It was submitted before deadline.
I presume you have access to do that?

Other people may want to see this before commit.

If you can't, I'll commit anyway, but if we have a system we should follow
it.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2016-03-10 12:34:30 Re: Patch: Implement failover on libpq connect level.
Previous Message Simon Riggs 2016-03-10 12:17:36 Re: Reduce lock levels others reloptions in ALTER TABLE