pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Make json_populate_record and friends operate recursively
Date: Fri, 07 Apr 2017 02:22:36 +0000
Message-ID: <E1cwJXo-0007lU-64@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Make json_populate_record and friends operate recursively

With this change array fields are populated from json(b) arrays, and
composite fields are populated from json(b) objects.

Along the way, some significant code refactoring is done to remove
redundancy in the way to populate_record[_set] and to_record[_set]
functions operate, and some significant efficiency gains are made by
caching tuple descriptors.

Nikita Glukhov, edited some by me.

Reviewed by Aleksander Alekseev and Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cf35346e813e5a1373f308d397bb0a8f3f21d530

Modified Files
--------------
doc/src/sgml/func.sgml              |   16 +-
src/backend/utils/adt/jsonfuncs.c   | 1700 ++++++++++++++++++++++++-----------
src/test/regress/expected/json.out  |  466 +++++++++-
src/test/regress/expected/jsonb.out |  478 +++++++++-
src/test/regress/sql/json.sql       |  156 +++-
src/test/regress/sql/jsonb.sql      |  156 +++-
6 files changed, 2412 insertions(+), 560 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cwJXo-0007lU-64@gemulon.postgresql.org>
Permalink:  ../E1cwJXo-0007lU-64@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cwJXo-0007lU-64@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net
  Subject: Re: pgsql: Make json_populate_record and friends operate recursively
  In-Reply-To: <E1cwJXo-0007lU-64@gemulon.postgresql.org>
  References: <E1cwJXo-0007lU-64@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox