Re: new json funcs

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: new json funcs
Date: 2014-01-28 22:07:41
Message-ID: 52E82A2D.9000605@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Andrew,

On 1/24/14, 7:26 PM, Andrew Dunstan wrote:
> OK, here's the patch, this time with docs, thanks to Merlin Moncure and
> Josh Berkus for help with that.

Thanks, this one is looking pretty good. A couple of small issues:

- The oid 3195 of json_object_agg_transfn has been taken by a recent
commit, so that had to be changed. The patch compiled and passed tests
after that.

- Typo in the description of json_build_array: "agument list"

- I find (perhaps due to not being a native speaker) the description
of json_object a bit painful to read. I would've expected something like:

- Builds a JSON object out of a text array. The array must have
exactly one dimension
+ Builds a JSON object out of a text array. The array must have
either exactly one dimension
with an even number of members, in which case they are taken
as alternating name/value
- pairs, or two dimensions with such that each inner array has
exactly two elements, which
+ pairs, or two dimensions such that each inner array has
exactly two elements, which
are taken as a name/value pair.

but I'm not sure about that either.

- There are a few cases of curly braces around a single-statement
else, which I believe is against the project's code style guidelines.

Otherwise this patch looks good to my eyes.

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2014-01-28 22:27:20 Re: Changeset Extraction v7.3
Previous Message Stephen Frost 2014-01-28 22:00:55 Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()