pgsql: Add new JSON processing functions and parser API.
От | Andrew Dunstan |
---|---|
Тема | pgsql: Add new JSON processing functions and parser API. |
Дата | |
Msg-id | E1ULdnv-0002oU-VL@gemulon.postgresql.org обсуждение исходный текст |
Ответы |
Re: pgsql: Add new JSON processing functions and parser API.
|
Список | pgsql-committers |
Add new JSON processing functions and parser API. The JSON parser is converted into a recursive descent parser, and exposed for use by other modules such as extensions. The API provides hooks for all the significant parser event such as the beginning and end of objects and arrays, and providing functions to handle these hooks allows for fairly simple construction of a wide variety of JSON processing functions. A set of new basic processing functions and operators is also added, which use this API, including operations to extract array elements, object fields, get the length of arrays and the set of keys of a field, deconstruct an object into a set of key/value pairs, and create records from JSON objects and arrays of objects. Catalog version bumped. Andrew Dunstan, with some documentation assistance from Merlin Moncure. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a570c98d7fa0841f17bbf51d62d02d9e493c7fcc Modified Files -------------- doc/src/sgml/func.sgml | 242 +++++- src/backend/catalog/system_views.sql | 8 + src/backend/utils/adt/Makefile | 4 +- src/backend/utils/adt/json.c | 908 +++++++++++------ src/backend/utils/adt/jsonfuncs.c | 1919 ++++++++++++++++++++++++++++++++++ src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_operator.h | 13 + src/include/catalog/pg_proc.h | 31 + src/include/utils/json.h | 16 + src/include/utils/jsonapi.h | 110 ++ src/test/regress/expected/json.out | 463 ++++++++ src/test/regress/sql/json.sql | 171 +++ 12 files changed, 3578 insertions(+), 309 deletions(-)
В списке pgsql-committers по дате отправления: