summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-08-17 22:57:20 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-08-17 22:57:56 -0400
commit560e2300b2ab395a367153e37d445fd584281cf7 (patch)
tree71810a671d79613a9ad99e38a15985494b3b1204 /doc/src
parent3b2f4aa0f0fe23b0cac753f91833df353994d298 (diff)
Use ISO 8601 format for dates converted to JSON, too.
Commit f30015b6d794c15d52abbb3df3a65081fbefb1ed made this happen for timestamp and timestamptz, but it seems pretty inconsistent to not do it for simple dates as well. (In passing, I re-pgindent'd json.c.)
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/release-9.4.sgml7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/src/sgml/release-9.4.sgml b/doc/src/sgml/release-9.4.sgml
index 7ae67e0cec2..5330c425d3d 100644
--- a/doc/src/sgml/release-9.4.sgml
+++ b/doc/src/sgml/release-9.4.sgml
@@ -120,7 +120,7 @@
<listitem>
<para>
- When converting values of type <type>timestamp</>
+ When converting values of type <type>date</>, <type>timestamp</>
or <type>timestamptz</>
to <link linkend="datatype-json"><type>JSON</type></link>, render the
values in a format compliant with ISO 8601 (Andrew Dunstan)
@@ -129,7 +129,10 @@
<para>
Previously such values were rendered according to the current
<xref linkend="guc-datestyle"> setting; but many JSON processors
- require timestamps to be in ISO 8601 format.
+ require timestamps to be in ISO 8601 format. If necessary, the
+ previous behavior can be obtained by explicitly casting the datetime
+ value to <type>text</> before passing it to the JSON conversion
+ function.
</para>
</listitem>