Output timestamps in ISO 8601 format when rendering JSON.
Andrew Dunstan <andrew@dunslane.net>
Output timestamps in ISO 8601 format when rendering JSON. Many JSON processors require timestamp strings in ISO 8601 format in order to convert the strings. When converting a timestamp, with or without timezone, to a JSON datum we therefore now use such a format rather than the type's default text output, in functions such as to_json(). This is a change in behaviour from 9.2 and 9.3, as noted in the release notes.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/release-9.4.sgml | modified | +18 −0 |
| src/backend/utils/adt/json.c | modified | +41 −0 |
| src/test/regress/expected/json_1.out | modified | +23 −0 |
| src/test/regress/expected/json.out | modified | +23 −0 |
| src/test/regress/sql/json.sql | modified | +11 −0 |