summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2014-08-18 02:57:15 +0000
committerTom Lane2014-08-18 02:57:46 +0000
commite56ec50c1622010c010e1c84bc02ce44285c4f41 (patch)
treeae99cf2479ddb8493f517013e6ee91f350bc81f2 /doc/src
parent3e9f70f1287b9324e398a084a8e881ea6aefc3eb (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>