Add array_to_json and row_to_json functions.
Andrew Dunstan <andrew@dunslane.net>
Add array_to_json and row_to_json functions. Also move the escape_json function from explain.c to json.c where it seems to belong. Andrew Dunstan, Reviewd by Abhijit Menon-Sen.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +59 −0 |
| src/backend/commands/explain.c | modified | +1 −46 |
| src/backend/utils/adt/json.c | modified | +352 −2 |
| src/include/catalog/pg_proc.h | modified | +8 −0 |
| src/include/utils/json.h | modified | +5 −0 |
| src/test/regress/expected/json.out | modified | +111 −0 |
| src/test/regress/sql/json.sql | modified | +43 −0 |