Re: [COMMITTERS] pgsql: Mark JSON error detail messages for translation.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Mark JSON error detail messages for translation.
Date: 2012-06-13 15:03:38
Message-ID: CA+TgmoZJ2i8APLZnwCdCXfuw8E1vGNNdBeZDd=eiPUOL4WCr1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Jun 13, 2012 at 10:35 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Jun 12, 2012 at 9:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> The code for this is as attached.  Note that I'd rip out the normal-path
>>> tracking of line boundaries; it seems better to have a second scan of
>>> the data in the error case and save the cycles in non-error cases.
>
>> Really?!
>
> Um ... do you have a problem with that idea, and if so what?  It would
> be considerably more complicated to do it without a second pass.

Could you explain how it's broken now, and why it will be hard to fix?
People may well want to use a cast to JSON within an exception block
as a way of testing whether strings are valid JSON. We should not
assume that the cost of an exception is totally irrelevant, because
this might be iterated.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2012-06-13 15:06:05 Re: [COMMITTERS] pgsql: Mark JSON error detail messages for translation.
Previous Message Tom Lane 2012-06-13 14:35:31 Re: [COMMITTERS] pgsql: Mark JSON error detail messages for translation.

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2012-06-13 15:05:58 Re: hint bit i/o reduction
Previous Message Andres Freund 2012-06-13 14:40:32 Re: [PATCH 16/16] current version of the design document