Thread: pgsql: Add array_to_json and row_to_json functions.

pgsql: Add array_to_json and row_to_json functions.

From
Andrew Dunstan
Date:
Add array_to_json and row_to_json functions.

Also move the escape_json function from explain.c to json.c where it
seems to belong.

Andrew Dunstan, Reviewd by Abhijit Menon-Sen.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/39909d1d39ae57c3a655fc7010e394e26b90fec9

Modified Files
--------------
doc/src/sgml/func.sgml             |   59 ++++++
src/backend/commands/explain.c     |   47 +-----
src/backend/utils/adt/json.c       |  354 +++++++++++++++++++++++++++++++++++-
src/include/catalog/pg_proc.h      |    8 +
src/include/utils/json.h           |    5 +
src/test/regress/expected/json.out |  111 +++++++++++
src/test/regress/sql/json.sql      |   43 +++++
7 files changed, 579 insertions(+), 48 deletions(-)