Re: PATCH: recursive json_populate_record()

Nikita Glukhov <n.gluhov@postgrespro.ru>

From: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: David Steele <david@pgmasters.net>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Aleksander Alekseev <a.alekseev@postgrespro.ru>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-03-22T16:04:07Z
Lists: pgsql-hackers

Attachments

On 22.03.2017 00:26, David Steele wrote:

> On 3/21/17 2:31 PM, Andrew Dunstan wrote:
>> On 03/21/2017 01:37 PM, David Steele wrote:
> >>
>>> This thread has been idle for months since Tom's review.
>>>
>>> The submission has been marked "Returned with Feedback". Please feel
>>> free to resubmit to a future commitfest.
>>
>> Please revive. I am planning to look at this later this week.
>
> Revived in "Waiting on Author" state.
>

Here is updated v05 version of this patch:
   * rebased to the latest master
   * one patch is completely removed because it is unnecessary now
   * added some macros for JsValue fields access
   * added new JsObject structure for passing json/jsonb objects
   * refactoring patch is not yet simplified (not broken into a 
step-by-step sequence)

Also I must notice that json branch of this code is not as optimal as it 
might be:
there could be repetitive parsing passes for nested json objects/arrays
instead of a single parsing pass.

-- 
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Commits

  1. Make edge-case behavior of jsonb_populate_record match json_populate_record

  2. Fix thinko in JsObjectSize() macro.

  3. Introduce convenience macros to hide JsonbContainer header accesses better.