Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit af03663

Browse files
committed
Minor wordsmithing in datetime docs to try to address gripes raised by
cnliou.
1 parent c5336a8 commit af03663

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.133 2003/11/30 20:55:09 joe Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.134 2003/12/01 20:34:53 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -1301,15 +1301,15 @@ SELECT b, char_length(b) FROM test2;
13011301
<entry>8 bytes</entry>
13021302
<entry>both date and time</entry>
13031303
<entry>4713 BC</entry>
1304-
<entry>AD 5874897</entry>
1304+
<entry>5874897 AD</entry>
13051305
<entry>1 microsecond / 14 digits</entry>
13061306
</row>
13071307
<row>
13081308
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] with time zone</type></entry>
13091309
<entry>8 bytes</entry>
13101310
<entry>both date and time, with time zone</entry>
13111311
<entry>4713 BC</entry>
1312-
<entry>AD 5874897</entry>
1312+
<entry>5874897 AD</entry>
13131313
<entry>1 microsecond / 14 digits</entry>
13141314
</row>
13151315
<row>
@@ -1348,6 +1348,14 @@ SELECT b, char_length(b) FROM test2;
13481348
</tgroup>
13491349
</table>
13501350

1351+
<note>
1352+
<para>
1353+
Prior to <productname>PostgreSQL</productname> 7.3, writing just
1354+
<type>timestamp</type> was equivalent to <type>timestamp with
1355+
time zone</type>. This was changed for SQL compliance.
1356+
</para>
1357+
</note>
1358+
13511359
<para>
13521360
<type>time</type>, <type>timestamp</type>, and
13531361
<type>interval</type> accept an optional precision value
@@ -1363,23 +1371,16 @@ SELECT b, char_length(b) FROM test2;
13631371
When <type>timestamp</> values are stored as double precision floating-point
13641372
numbers (currently the default), the effective limit of precision
13651373
may be less than 6. <type>timestamp</type> values are stored as seconds
1366-
since 2000-01-01, and microsecond precision is achieved for dates within
1367-
a few years of 2000-01-01, but the precision degrades for dates further
1368-
away. When <type>timestamp</type> values are stored as eight-byte integers (a compile-time
1374+
before or after midnight 2000-01-01. Microsecond precision is achieved for
1375+
dates within a few years of 2000-01-01, but the precision degrades for
1376+
dates further away. When <type>timestamp</type> values are stored as
1377+
eight-byte integers (a compile-time
13691378
option), microsecond precision is available over the full range of
1370-
values. However eight-byte integer timestamps have a reduced range of
1371-
dates from 4713 BC up to 294276 AD.
1379+
values. However eight-byte integer timestamps have a more limited range of
1380+
dates than shown above: from 4713 BC up to 294276 AD.
13721381
</para>
13731382
</note>
13741383

1375-
<note>
1376-
<para>
1377-
Prior to <productname>PostgreSQL</productname> 7.3, writing just
1378-
<type>timestamp</type> was equivalent to <type>timestamp with
1379-
time zone</type>. This was changed for SQL compliance.
1380-
</para>
1381-
</note>
1382-
13831384
<para>
13841385
For the <type>time</type> types, the allowed range of
13851386
<replaceable>p</replaceable> is from 0 to 6 when eight-byte integer

doc/src/sgml/datetime.sgml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.38 2003/11/29 19:51:36 pgsql Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.39 2003/12/01 20:34:53 tgl Exp $
33
-->
44

55
<appendix id="datetime-appendix">
@@ -370,15 +370,25 @@ $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.38 2003/11/29 19:51:36 pgsql E
370370

371371
<para>
372372
<xref linkend="datetime-timezone-table"> shows the time zone
373-
abbreviations recognized by <productname>PostgreSQL</productname>.
374-
<productname>PostgreSQL</productname> contains internal tabular
375-
information for time zone decoding, since there is no standard
373+
abbreviations recognized by <productname>PostgreSQL</productname>
374+
in date/time input values.
375+
<productname>PostgreSQL</productname> uses internal tables
376+
for time zone input decoding, since there is no standard
376377
operating system interface to provide access to general,
377378
cross-time zone information. The underlying operating system
378379
<emphasis>is</emphasis> used to provide time zone information for
379380
<emphasis>output</emphasis>, however.
380381
</para>
381382

383+
<para>
384+
Keep in mind also that the time zone names
385+
recognized by <command>SET TIMEZONE</> are operating-system
386+
dependent and may have little to do with <xref
387+
linkend="datetime-timezone-table">. For example, some systems
388+
recognize values like <literal>'Europe/Rome'</> in <command>SET
389+
TIMEZONE</>.
390+
</para>
391+
382392
<para>
383393
The table is organized by time zone offset from <acronym>UTC</>,
384394
rather than alphabetically. This is intended to facilitate

0 commit comments

Comments
 (0)