Re: [PATCH] Generalized JSON output functions - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: [PATCH] Generalized JSON output functions
Date
Msg-id CAHyXU0zozNhzrPJXL9F1k63XtgUaUvZZs7051CxJkvJznEjXqw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Generalized JSON output functions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [PATCH] Generalized JSON output functions  (Ryan Pedela <rpedela@datalanche.com>)
List pgsql-hackers
On Fri, May 22, 2015 at 9:43 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Andrew Dunstan wrote:
>>
>> On 05/20/2015 09:16 AM, Shulgin, Oleksandr wrote:
>
>> >Attached is a patch against master to generalize the JSON-producing
>> >functions in utils/adt/json.c and to provide a set of callbacks which can
>> >be overridden the same way that is already provided for *parsing* JSON.
>
>> I'm not necessarily opposed to this, but it sure seems like a lot of
>> changes, and moderately invasive ones, to support something that could be
>> done, at the cost of reparsing, with a simple loadable extension that I
>> could create in a few hours of programming.
>
> But this seems like a pretty reasonable change to make, no?  Doesn't the
> total amount of code decrease after this patch?  JSON stuff is pretty
> new so some refactoring and generalization of what we have is to be
> expected.

Yeah.  Also, there have been a few previous gripes about this, for
example, http://www.postgresql.org/message-id/CAHbVmPzS+sVR+y-UgxjRq+XW4dqteVL-cOzc69zFFwmxjcKCxg@mail.gmail.com.
As noted, I definitely prefer 'space free' by default for efficiency
reasons, but standardizing the output has definitely got to be a
reasonable goal.

merlin



pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: pg_dump quietly ignore missing tables - is it bug?
Next
From: Andres Freund
Date:
Subject: Re: Issues in Replication Progress Tracking