Skip to content

Commit 676a7c0

Browse files
committed
Update description of timestamp types for 7.3 implementation.
1 parent 1ce069b commit 676a7c0

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.105 2002/10/21 02:12:08 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.106 2002/10/31 22:18:42 tgl Exp $
33
-->
44

55
<chapter id="datatype">
@@ -1276,15 +1276,15 @@ SELECT b, char_length(b) FROM test2;
12761276
</thead>
12771277
<tbody>
12781278
<row>
1279-
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] without time zone</type></entry>
1279+
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] [ without time zone ]</type></entry>
12801280
<entry>both date and time</entry>
12811281
<entry>8 bytes</entry>
12821282
<entry>4713 BC</entry>
12831283
<entry>AD 1465001</entry>
12841284
<entry>1 microsecond / 14 digits</entry>
12851285
</row>
12861286
<row>
1287-
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] [ with time zone ]</type></entry>
1287+
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] with time zone</type></entry>
12881288
<entry>both date and time</entry>
12891289
<entry>8 bytes</entry>
12901290
<entry>4713 BC</entry>
@@ -1293,7 +1293,7 @@ SELECT b, char_length(b) FROM test2;
12931293
</row>
12941294
<row>
12951295
<entry><type>interval [ (<replaceable>p</replaceable>) ]</type></entry>
1296-
<entry>for time intervals</entry>
1296+
<entry>time intervals</entry>
12971297
<entry>12 bytes</entry>
12981298
<entry>-178000000 years</entry>
12991299
<entry>178000000 years</entry>
@@ -1334,16 +1334,22 @@ SELECT b, char_length(b) FROM test2;
13341334
optional precision value <replaceable>p</replaceable> which
13351335
specifies the number of fractional digits retained in the seconds
13361336
field. By default, there is no explicit bound on precision. The
1337-
effective limit of precision is determined by the underlying double
1338-
precision floating-point number used to store values (in seconds
1339-
for <type>interval</type> and
1340-
in seconds since 2000-01-01 for <type>timestamp</type>). The
1341-
useful range of <replaceable>p</replaceable> is from 0 to about
1342-
6 for <type>timestamp</type>, but may be more for <type>interval</type>.
1343-
The system will accept <replaceable>p</replaceable> ranging from
1344-
0 to 13.
1337+
allowed range of <replaceable>p</replaceable> is from 0 to 6.
13451338
</para>
13461339

1340+
<note>
1341+
<para>
1342+
When timestamps are stored as double precision floating-point
1343+
numbers (currently the default), the effective limit of precision
1344+
may be less than 6, since timestamp values are stored as seconds
1345+
since 2000-01-01. Microsecond precision is achieved for dates within
1346+
a few years of 2000-01-01, but the precision degrades for dates further
1347+
away. When timestamps are stored as eight-byte integers (a compile-time
1348+
option), microsecond precision is available over the full range of
1349+
values.
1350+
</para>
1351+
</note>
1352+
13471353
<para>
13481354
Time zones, and time-zone conventions, are influenced by
13491355
political decisions, not just earth geometry. Time zones around the

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy