@@ -2206,37 +2206,46 @@ January 8 04:05:06 1999 PST
2206
2206
</thead>
2207
2207
<tbody>
2208
2208
<row>
2209
- <entry>ISO</entry>
2210
- <entry>ISO 8601/ SQL standard</entry>
2211
- <entry>1997-12-17 07:37:16-08</entry>
2209
+ <entry><literal> ISO</literal> </entry>
2210
+ <entry>ISO 8601, SQL standard</entry>
2211
+ <entry><literal> 1997-12-17 07:37:16-08</literal> </entry>
2212
2212
</row>
2213
2213
<row>
2214
- <entry>SQL</entry>
2214
+ <entry><literal> SQL</literal> </entry>
2215
2215
<entry>traditional style</entry>
2216
- <entry>12/17/1997 07:37:16.00 PST</entry>
2216
+ <entry><literal> 12/17/1997 07:37:16.00 PST</literal> </entry>
2217
2217
</row>
2218
2218
<row>
2219
- <entry>POSTGRES </entry>
2219
+ <entry><literal>Postgres</literal> </entry>
2220
2220
<entry>original style</entry>
2221
- <entry>Wed Dec 17 07:37:16 1997 PST</entry>
2221
+ <entry><literal> Wed Dec 17 07:37:16 1997 PST</literal> </entry>
2222
2222
</row>
2223
2223
<row>
2224
- <entry>German</entry>
2224
+ <entry><literal> German</literal> </entry>
2225
2225
<entry>regional style</entry>
2226
- <entry>17.12.1997 07:37:16.00 PST</entry>
2226
+ <entry><literal> 17.12.1997 07:37:16.00 PST</literal> </entry>
2227
2227
</row>
2228
2228
</tbody>
2229
2229
</tgroup>
2230
2230
</table>
2231
2231
2232
+ <note>
2233
+ <para>
2234
+ ISO 8601 specifies the use of uppercase letter <literal>T</> to separate
2235
+ the date and time. <productname>PostgreSQL</> accepts that format on
2236
+ input, but on output it uses a space rather than <literal>T</>, as shown
2237
+ above. This is for readability and for consistency with RFC 3339 as
2238
+ well as some other database systems.
2239
+ </para>
2240
+ </note>
2241
+
2232
2242
<para>
2233
2243
In the <acronym>SQL</acronym> and POSTGRES styles, day appears before
2234
2244
month if DMY field ordering has been specified, otherwise month appears
2235
2245
before day.
2236
2246
(See <xref linkend="datatype-datetime-input">
2237
2247
for how this setting also affects interpretation of input values.)
2238
- <xref linkend="datatype-datetime-output2-table"> shows an
2239
- example.
2248
+ <xref linkend="datatype-datetime-output2-table"> shows examples.
2240
2249
</para>
2241
2250
2242
2251
<table id="datatype-datetime-output2-table">
@@ -2253,29 +2262,33 @@ January 8 04:05:06 1999 PST
2253
2262
<row>
2254
2263
<entry><literal>SQL, DMY</></entry>
2255
2264
<entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
2256
- <entry>17/12/1997 15:37:16.00 CET</entry>
2265
+ <entry><literal> 17/12/1997 15:37:16.00 CET</literal> </entry>
2257
2266
</row>
2258
2267
<row>
2259
2268
<entry><literal>SQL, MDY</></entry>
2260
2269
<entry><replaceable>month</replaceable>/<replaceable>day</replaceable>/<replaceable>year</replaceable></entry>
2261
- <entry>12/17/1997 07:37:16.00 PST</entry>
2270
+ <entry><literal> 12/17/1997 07:37:16.00 PST</literal> </entry>
2262
2271
</row>
2263
2272
<row>
2264
2273
<entry><literal>Postgres, DMY</></entry>
2265
2274
<entry><replaceable>day</replaceable>/<replaceable>month</replaceable>/<replaceable>year</replaceable></entry>
2266
- <entry>Wed 17 Dec 07:37:16 1997 PST</entry>
2275
+ <entry><literal> Wed 17 Dec 07:37:16 1997 PST</literal> </entry>
2267
2276
</row>
2268
2277
</tbody>
2269
2278
</tgroup>
2270
2279
</table>
2271
2280
2272
2281
<para>
2273
- The date/time styles can be selected by the user using the
2282
+ The date/time style can be selected by the user using the
2274
2283
<command>SET datestyle</command> command, the <xref
2275
2284
linkend="guc-datestyle"> parameter in the
2276
2285
<filename>postgresql.conf</filename> configuration file, or the
2277
2286
<envar>PGDATESTYLE</envar> environment variable on the server or
2278
- client. The formatting function <function>to_char</function>
2287
+ client.
2288
+ </para>
2289
+
2290
+ <para>
2291
+ The formatting function <function>to_char</function>
2279
2292
(see <xref linkend="functions-formatting">) is also available as
2280
2293
a more flexible way to format date/time output.
2281
2294
</para>
0 commit comments