mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
JSON generation improvements.
This adds the following: json_agg(anyrecord) -> json to_json(any) -> json hstore_to_json(hstore) -> json (also used as a cast) hstore_to_json_loose(hstore) -> json The last provides heuristic treatment of numbers and booleans. Also, in json generation, if any non-builtin type has a cast to json, that function is used instead of the type's output function. Andrew Dunstan, reviewed by Steve Singer. Catalog version bumped.
This commit is contained in:
@ -25,6 +25,11 @@ extern Datum array_to_json(PG_FUNCTION_ARGS);
|
||||
extern Datum array_to_json_pretty(PG_FUNCTION_ARGS);
|
||||
extern Datum row_to_json(PG_FUNCTION_ARGS);
|
||||
extern Datum row_to_json_pretty(PG_FUNCTION_ARGS);
|
||||
extern Datum to_json(PG_FUNCTION_ARGS);
|
||||
|
||||
extern Datum json_agg_transfn(PG_FUNCTION_ARGS);
|
||||
extern Datum json_agg_finalfn(PG_FUNCTION_ARGS);
|
||||
|
||||
extern void escape_json(StringInfo buf, const char *str);
|
||||
|
||||
#endif /* JSON_H */
|
||||
|
Reference in New Issue
Block a user