mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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.
This commit is contained in:
@ -787,3 +787,11 @@ COMMENT ON FUNCTION ts_debug(text) IS
|
||||
CREATE OR REPLACE FUNCTION
|
||||
pg_start_backup(label text, fast boolean DEFAULT false)
|
||||
RETURNS text STRICT VOLATILE LANGUAGE internal AS 'pg_start_backup';
|
||||
|
||||
CREATE OR REPLACE FUNCTION
|
||||
json_populate_record(base anyelement, from_json json, use_json_as_text boolean DEFAULT false)
|
||||
RETURNS anyelement LANGUAGE internal STABLE AS 'json_populate_record';
|
||||
|
||||
CREATE OR REPLACE FUNCTION
|
||||
json_populate_recordset(base anyelement, from_json json, use_json_as_text boolean DEFAULT false)
|
||||
RETURNS SETOF anyelement LANGUAGE internal STABLE ROWS 100 AS 'json_populate_recordset';
|
||||
|
@ -19,8 +19,8 @@ OBJS = acl.o arrayfuncs.o array_selfuncs.o array_typanalyze.o \
|
||||
array_userfuncs.o arrayutils.o bool.o \
|
||||
cash.o char.o date.o datetime.o datum.o domains.o \
|
||||
enum.o float.o format_type.o \
|
||||
geo_ops.o geo_selfuncs.o int.o int8.o json.o like.o lockfuncs.o \
|
||||
misc.o nabstime.o name.o numeric.o numutils.o \
|
||||
geo_ops.o geo_selfuncs.o int.o int8.o json.o jsonfuncs.o like.o \
|
||||
lockfuncs.o misc.o nabstime.o name.o numeric.o numutils.o \
|
||||
oid.o oracle_compat.o pseudotypes.o rangetypes.o rangetypes_gist.o \
|
||||
rowtypes.o regexp.o regproc.o ruleutils.o selfuncs.o \
|
||||
tid.o timestamp.o varbit.o varchar.o varlena.o version.o xid.o \
|
||||
|
File diff suppressed because it is too large
Load Diff
1919
src/backend/utils/adt/jsonfuncs.c
Normal file
1919
src/backend/utils/adt/jsonfuncs.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user