Re: jsonb generator functions

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonb generator functions
Date: 2014-10-15 19:54:47
Message-ID: 543ED107.9030602@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 10/15/2014 07:38 AM, Pavel Stehule wrote:
>
>
> 2014-10-13 17:22 GMT+02:00 Andrew Dunstan <andrew(at)dunslane(dot)net
> <mailto:andrew(at)dunslane(dot)net>>:
>
>
> On 10/13/2014 09:37 AM, Andrew Dunstan wrote:
>
>
> On 09/26/2014 04:54 PM, Andrew Dunstan wrote:
>
>
> Here is a patch for the generator and aggregate functions
> for jsonb that we didn't manage to get done in time for
> 9.4. They are all equivalents of the similarly names json
> functions. Included are
>
> to_jsonb
> jsonb_build_object
> jsonb_build_array
> jsonb_object
> jsonb_agg
> jsonb_object_agg
>
>
> Still to come: documentation.
>
> Adding to the next commitfest.
>
>
>
> Revised patch to fix compiler warnings.
>
>
> And again, initializing an incompletely initialized variable, as
> found by Pavel Stehule.
>
>
> I checked a code, and I have only two small objection - a name
> "jsonb_object_two_arg" is not good - maybe "json_object_keys_values" ?

It's consistent with the existing json_object_two_arg. In all cases I
think I kept the names the same except for changing "json" to "jsonb".
Note that these _two_arg functions are not visible at the SQL level -
they are only visible in the C code.

I'm happy to be guided by others in changing or keeping these names.

>
> Next: there are no tests for to_jsonb function.
>
>

Oh, my bad. I'll add some.

Thank for the review.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-10-15 19:59:31 Re: Column Redaction
Previous Message Alvaro Herrera 2014-10-15 19:53:18 Re: replicating DROP commands across servers