pgsql: Output timestamps in ISO 8601 format when rendering JSON.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Output timestamps in ISO 8601 format when rendering JSON.
Date: 2014-06-03 17:59:14
Message-ID: E1WrszS-0007hW-V6@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2014-06-03 20:18:35 pgsql: Do not escape a unicode sequence when escaping JSON text.
Previous Message Tom Lane 2014-06-03 16:02:34 pgsql: Make plpython_unicode regression test work in more database enco