pgsql: Built-in JSON data type.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Built-in JSON data type.
Date: 2012-01-31 16:50:58
Message-ID: E1RsGv4-0002fH-KJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Built-in JSON data type.

Like the XML data type, we simply store JSON data as text, after checking
that it is valid. More complex operations such as canonicalization and
comparison may come later, but this is enough for not.

There are a few open issues here, such as whether we should attempt to
detect UTF-8 surrogate pairs represented as \uXXXX\uYYYY, but this gets
the basic framework in place.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5384a73f98d9829725186a7b65bf4f8adb3cfaf1

Modified Files
--------------
doc/src/sgml/datatype.sgml | 32 ++
src/backend/commands/explain.c | 11 +-
src/backend/utils/adt/Makefile | 2 +-
src/backend/utils/adt/json.c | 665 ++++++++++++++++++++++++++++++++++++
src/include/catalog/pg_proc.h | 10 +
src/include/catalog/pg_type.h | 3 +
src/include/utils/json.h | 24 ++
src/test/regress/expected/json.out | 258 ++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/json.sql | 56 +++
11 files changed, 1059 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2012-01-31 16:52:01 pgsql: Catversion bump for JSON patch.
Previous Message Simon Riggs 2012-01-31 08:59:12 Re: pgsql: Resolve timing issue with logging locks for Hot Standby.