aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-22 21:45:30 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-22 21:45:30 +0000
commitf545a05704e5148fec1f373820603cc7be73e7dd (patch)
treea8425092987c209d1800b252726d81e0284c0074
parent14e9a17f0a08a908567867cd77b274320e1280f8 (diff)
downloadpostgresql-f545a05704e5148fec1f373820603cc7be73e7dd.tar.gz
postgresql-f545a05704e5148fec1f373820603cc7be73e7dd.zip
Update interval documenation to mention the storage system used.
-rw-r--r--doc/src/sgml/datatype.sgml21
1 files changed, 16 insertions, 5 deletions
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 03732ba9cab..01cc93c8e05 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.163 2005/10/22 19:33:57 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.163.2.1 2005/12/22 21:45:30 momjian Exp $
-->
<chapter id="datatype">
@@ -1841,9 +1841,20 @@ January 8 04:05:06 1999 PST
</para>
<para>
- The optional precision
- <replaceable>p</replaceable> should be between 0 and 6, and
- defaults to the precision of the input literal.
+ The optional subsecond precision <replaceable>p</replaceable> should
+ be between 0 and 6, and defaults to the precision of the input literal.
+ </para>
+
+ <para>
+ Internally <type>interval</> values are stored as months, days,
+ and seconds. This is done because the number of days in a month
+ varies, and a day can have 23 or 25 hours if a daylight savings
+ time adjustment is involved. Because intervals are usually created
+ from constant strings or <type>timestamp</> subtraction, this
+ storage method works well in most cases. Functions
+ <function>justify_days</> and <function>justify_hours</> are
+ available for adjusting days and hours that overflow their normal
+ periods.
</para>
</sect3>
@@ -1936,7 +1947,7 @@ January 8 04:05:06 1999 PST
<literal>CURRENT_DATE</literal>, <literal>CURRENT_TIME</literal>,
<literal>CURRENT_TIMESTAMP</literal>, <literal>LOCALTIME</literal>,
<literal>LOCALTIMESTAMP</literal>. The latter four accept an
- optional precision specification. (See <xref
+ optional subsecond precision specification. (See <xref
linkend="functions-datetime-current">.) Note however that these are
SQL functions and are <emphasis>not</> recognized as data input strings.
</para>