pgsql: Add several generator functions for jsonb that exist for json.

Started by Andrew Dunstanover 11 years ago1 messagescomitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Add several generator functions for jsonb that exist for json.

The functions are:
to_jsonb()
jsonb_object()
jsonb_build_object()
jsonb_build_array()
jsonb_agg()
jsonb_object_agg()

Also along the way some better logic is implemented in
json_categorize_type() to match that in the newly implemented
jsonb_categorize_type().

Andrew Dunstan, reviewed by Pavel Stehule and Alvaro Herrera.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7e354ab9fe9e7c3b0a7a40f226c76bd5cf6438d0

Modified Files
--------------
doc/src/sgml/func.sgml | 97 ++-
src/backend/utils/adt/json.c | 44 +-
src/backend/utils/adt/jsonb.c | 1396 +++++++++++++++++++++++++++++++++
src/backend/utils/adt/jsonb_util.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_aggregate.h | 4 +
src/include/catalog/pg_proc.h | 26 +
src/include/utils/jsonb.h | 16 +
src/test/regress/expected/jsonb.out | 173 ++++
src/test/regress/expected/jsonb_1.out | 173 ++++
src/test/regress/sql/jsonb.sql | 115 +++
11 files changed, 2003 insertions(+), 45 deletions(-)

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