]> granicus.if.org Git - postgresql/commit
Output timestamps in ISO 8601 format when rendering JSON.
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 3 Jun 2014 17:56:53 +0000 (13:56 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 3 Jun 2014 17:56:53 +0000 (13:56 -0400)
commitf30015b6d794c15d52abbb3df3a65081fbefb1ed
tree6be9d4a73a40a628474f11f173252f16f72c6959
parent2dfa15de5510b3c19ffb92b512c39d5440a07b1e
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.
doc/src/sgml/release-9.4.sgml
src/backend/utils/adt/json.c
src/test/regress/expected/json.out
src/test/regress/expected/json_1.out
src/test/regress/sql/json.sql