mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
New json functions.
json_build_array() and json_build_object allow for the construction of arbitrarily complex json trees. json_object() turns a one or two dimensional array, or two separate arrays, into a json_object of name/value pairs, similarly to the hstore() function. json_object_agg() aggregates its two arguments into a single json object as name value pairs. Catalog version bumped. Andrew Dunstan, reviewed by Marko Tiikkaja.
This commit is contained in:
@ -31,6 +31,17 @@ extern Datum to_json(PG_FUNCTION_ARGS);
|
||||
extern Datum json_agg_transfn(PG_FUNCTION_ARGS);
|
||||
extern Datum json_agg_finalfn(PG_FUNCTION_ARGS);
|
||||
|
||||
extern Datum json_object_agg_finalfn(PG_FUNCTION_ARGS);
|
||||
extern Datum json_object_agg_transfn(PG_FUNCTION_ARGS);
|
||||
|
||||
extern Datum json_build_object(PG_FUNCTION_ARGS);
|
||||
extern Datum json_build_object_noargs(PG_FUNCTION_ARGS);
|
||||
extern Datum json_build_array(PG_FUNCTION_ARGS);
|
||||
extern Datum json_build_array_noargs(PG_FUNCTION_ARGS);
|
||||
|
||||
extern Datum json_object(PG_FUNCTION_ARGS);
|
||||
extern Datum json_object_two_arg(PG_FUNCTION_ARGS);
|
||||
|
||||
extern void escape_json(StringInfo buf, const char *str);
|
||||
|
||||
extern Datum json_typeof(PG_FUNCTION_ARGS);
|
||||
@ -49,5 +60,7 @@ extern Datum json_each_text(PG_FUNCTION_ARGS);
|
||||
extern Datum json_array_elements(PG_FUNCTION_ARGS);
|
||||
extern Datum json_populate_record(PG_FUNCTION_ARGS);
|
||||
extern Datum json_populate_recordset(PG_FUNCTION_ARGS);
|
||||
extern Datum json_to_record(PG_FUNCTION_ARGS);
|
||||
extern Datum json_to_recordset(PG_FUNCTION_ARGS);
|
||||
|
||||
#endif /* JSON_H */
|
||||
|
Reference in New Issue
Block a user