From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: New json functions. |
Date: | 2014-01-28 22:55:43 |
Message-ID: | E1W8HZH-0007F6-8W@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
New json functions.
json_build_array() and json_build_object allow for the construction of
arbitrarily complex json trees. json_object() turns a one or two
dimensional array, or two separate arrays, into a json_object of
name/value pairs, similarly to the hstore() function.
json_object_agg() aggregates its two arguments into a single json object
as name value pairs.
Catalog version bumped.
Andrew Dunstan, reviewed by Marko Tiikkaja.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/105639900bf83fd3e3eb5b49f49b4d74d6347b9b
Modified Files
--------------
doc/src/sgml/func.sgml | 158 ++++++++++
src/backend/utils/adt/json.c | 577 ++++++++++++++++++++++++++++++++--
src/backend/utils/adt/jsonfuncs.c | 176 ++++++++---
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_aggregate.h | 1 +
src/include/catalog/pg_proc.h | 22 ++
src/include/utils/json.h | 13 +
src/test/regress/expected/json.out | 126 ++++++++
src/test/regress/expected/json_1.out | 126 ++++++++
src/test/regress/sql/json.sql | 87 +++++
10 files changed, 1219 insertions(+), 69 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2014-01-28 22:57:52 | Re: pgsql: New json functions. |
Previous Message | Tom Lane | 2014-01-28 20:28:12 | Re: pgsql: Add pg_stat_archiver statistics view. |