pgsql: Output timestamps in ISO 8601 format when rendering JSON. - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: Output timestamps in ISO 8601 format when rendering JSON.
Date
Msg-id E1WrszS-0007hW-V6@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f30015b6d794c15d52abbb3df3a65081fbefb1ed

Modified Files
--------------
doc/src/sgml/release-9.4.sgml        |   18 +++++++++++++++
src/backend/utils/adt/json.c         |   41 ++++++++++++++++++++++++++++++++++
src/test/regress/expected/json.out   |   23 +++++++++++++++++++
src/test/regress/expected/json_1.out |   23 +++++++++++++++++++
src/test/regress/sql/json.sql        |   11 +++++++++
5 files changed, 116 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Make plpython_unicode regression test work in more database enco
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Do not escape a unicode sequence when escaping JSON text.