Spiff up discussion of precision on date/time data types.
Add a NetBSD/alpha and update info on a few other platforms.
This commit is contained in:
parent
2d004d7f95
commit
9640666c6f
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.78 2001/12/08 03:24:22 thomas Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.79 2001/12/21 03:54:02 thomas Exp $
|
||||
-->
|
||||
|
||||
<chapter id="datatype">
|
||||
@ -1328,21 +1328,20 @@ SELECT b, char_length(b) FROM test2;
|
||||
|
||||
<para>
|
||||
<type>time</type> and <type>timestamp</type> both accept an
|
||||
option precision field <replaceable>p</replaceable> which
|
||||
optional precision field <replaceable>p</replaceable> which
|
||||
determines the number of digits retained beyond the seconds
|
||||
decimal point. By default, there is no explicit bound on precision
|
||||
and the actual precision is determined by the underlying double
|
||||
precision floating point number used to store values in seconds
|
||||
for <type>interval</type> and
|
||||
since 2000-01-01 in the case of <type>timestamp</type>.
|
||||
in seconds since 2000-01-01 for <type>timestamp</type>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Time zones, and time-zone conventions, are influenced by
|
||||
political decisions, not just physical effects. Time zones have
|
||||
become somewhat standardized around the world during the 1900's,
|
||||
but continue to
|
||||
be prone to arbitrary changes.
|
||||
political decisions, not just geometry. Time zones around the
|
||||
world became somewhat standardized during the 1900's,
|
||||
but continue to be prone to arbitrary changes.
|
||||
<productname>PostgreSQL</productname> uses your operating
|
||||
system's underlying features to provide time-zone
|
||||
support, and these systems usually contain information for only
|
||||
@ -1354,13 +1353,15 @@ SELECT b, char_length(b) FROM test2;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To ensure compatibility to earlier versions of <productname>PostgreSQL</productname>
|
||||
To ensure compatibility to earlier versions of
|
||||
<productname>PostgreSQL</productname>
|
||||
we continue to provide <type>datetime</type>
|
||||
(equivalent to <type>timestamp</type>) and
|
||||
<type>timespan</type> (equivalent to <type>interval</type>),
|
||||
however support for these is now restricted to having an
|
||||
implicit translation to <type>timestamp</type> and
|
||||
<type>interval</type>.
|
||||
<type>interval</type>, and these name mappings will be removed in
|
||||
the next version.
|
||||
The types <type>abstime</type>
|
||||
and <type>reltime</type> are lower precision types which are used internally.
|
||||
You are discouraged from using any of these types in new
|
||||
@ -1376,9 +1377,12 @@ SELECT b, char_length(b) FROM test2;
|
||||
Date and time input is accepted in almost any reasonable format, including
|
||||
<acronym>ISO 8601</acronym>, <acronym>SQL</acronym>-compatible,
|
||||
traditional <productname>PostgreSQL</productname>, and others.
|
||||
The ordering of month and day in date input can be ambiguous, therefore a setting
|
||||
exists to specify how it should be interpreted in ambiguous cases. The command
|
||||
<literal>SET DateStyle TO 'US'</literal> or <literal>SET DateStyle TO 'NonEuropean'</literal>
|
||||
For some formats, ordering of month and day in date input can be
|
||||
ambiguous and there is support for specifying the expected
|
||||
ordering of these fields.
|
||||
The command
|
||||
<literal>SET DateStyle TO 'US'</literal>
|
||||
or <literal>SET DateStyle TO 'NonEuropean'</literal>
|
||||
specifies the variant <quote>month before day</quote>, the command
|
||||
<literal>SET DateStyle TO 'European'</literal> sets the variant
|
||||
<quote>day before month</quote>. The <literal>ISO</literal> style
|
||||
@ -1386,24 +1390,29 @@ SELECT b, char_length(b) FROM test2;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<productname>PostgreSQL</productname> is more flexible in
|
||||
handling date/time than the
|
||||
<acronym>SQL</acronym> standard requires.
|
||||
See <xref linkend="datetime-appendix">
|
||||
for the exact parsing rules of date/time input and for the recognized time zones.
|
||||
for the exact parsing rules of date/time input and for the
|
||||
recognized time zones.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Remember that any date or time input needs to be enclosed into
|
||||
single quotes, like text strings. Refer to <xref
|
||||
linkend="sql-syntax-constants-generic"> for more information.
|
||||
Remember that any date or time literal input needs to be enclosed
|
||||
in single quotes, like text strings. Refer to
|
||||
<xref linkend="sql-syntax-constants-generic"> for more
|
||||
information.
|
||||
<acronym>SQL9x</acronym> requires the following syntax
|
||||
<synopsis>
|
||||
<replaceable>type</replaceable> [ (<replaceable>p</replaceable>) ] '<replaceable>value</replaceable>'
|
||||
</synopsis>
|
||||
where <replaceable>p</replaceable> is an integer specifying the
|
||||
number of fractional digits in the seconds field, and is allowed
|
||||
for <type>time</type>, <type>timestamp</type>, and <type>interval</type> types.
|
||||
<productname>PostgreSQL</productname> is more flexible in
|
||||
handling date/time than the
|
||||
<acronym>SQL</acronym> standard requires.
|
||||
where <replaceable>p</replaceable> in the optional precision
|
||||
specification is an integer corresponding to the
|
||||
number of fractional digits in the seconds field. Precision can
|
||||
be specified
|
||||
for <type>time</type>, <type>timestamp</type>, and
|
||||
<type>interval</type> types.
|
||||
</para>
|
||||
|
||||
<sect3>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.70 2001/12/19 18:49:56 petere Exp $ -->
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.71 2001/12/21 03:54:02 thomas Exp $ -->
|
||||
|
||||
<chapter id="installation">
|
||||
<title><![%standalone-include[<productname>PostgreSQL</>]]>
|
||||
@ -1372,9 +1372,10 @@ gunzip -c user.ps.gz \
|
||||
<entry><systemitem class="osname">AIX</></entry>
|
||||
<entry><systemitem>RS6000</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-11-28,
|
||||
Andreas Zeugswetter (<email>ZeugswetterA@spardat.at</email>)</entry>
|
||||
<entry>4.3; see also <filename>doc/FAQ_AIX</filename></entry>
|
||||
<entry>2001-12-19,
|
||||
Andreas Zeugswetter (<email>ZeugswetterA@spardat.at</email>),
|
||||
Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>)</entry>
|
||||
<entry>see also <filename>doc/FAQ_AIX</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">BeOS</></entry>
|
||||
@ -1392,6 +1393,14 @@ gunzip -c user.ps.gz \
|
||||
Bruce Momjian (<email>pgman@candle.pha.pa.us</email>)</entry>
|
||||
<entry>4.2</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">FreeBSD</></entry>
|
||||
<entry><systemitem>Alpha</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-18,
|
||||
Chris Kings-Lynne (<email>chriskl@familyhealth.com.au</email>)</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">FreeBSD</></entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
@ -1428,9 +1437,9 @@ gunzip -c user.ps.gz \
|
||||
<row>
|
||||
<entry><systemitem class="osname">Linux</></entry>
|
||||
<entry><systemitem>armv4l</></entry>
|
||||
<entry>7.1</entry>
|
||||
<entry>2001-02-22,
|
||||
Mark Knox (<email>markk@pixin.net</email>)</entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-10,
|
||||
Mark Knox (<email>segfault@hardline.org</email>)</entry>
|
||||
<entry>2.2.x</entry>
|
||||
</row>
|
||||
<row>
|
||||
@ -1441,6 +1450,14 @@ gunzip -c user.ps.gz \
|
||||
Hisao Shibuya (<email>shibuya@alpha.or.jp</>)</entry>
|
||||
<entry>2.0.x; <productname>Cobalt Qube2</></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Linux</></entry>
|
||||
<entry><systemitem>PlayStation2</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-12,
|
||||
Permaine Cheung <email>pcheung@redhat.com</email>)</entry>
|
||||
<entry>#undef HAS_TEST_AND_SET, slock_t</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Linux</></entry>
|
||||
<entry><systemitem>PPC74xx</></entry>
|
||||
@ -1452,9 +1469,9 @@ gunzip -c user.ps.gz \
|
||||
<row>
|
||||
<entry><systemitem class="osname">Linux</></entry>
|
||||
<entry><systemitem>S/390</></entry>
|
||||
<entry>7.1</entry>
|
||||
<entry>2000-11-17,
|
||||
Neale Ferguson (<email>Neale.Ferguson@softwareAG-usa.com</email>)</entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-12,
|
||||
Permaine Cheung <email>pcheung@redhat.com</email>)</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
@ -1565,11 +1582,20 @@ gunzip -c user.ps.gz \
|
||||
<row>
|
||||
<entry><systemitem class="osname">QNX 4.25</></entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>7.1</entry>
|
||||
<entry>2001-05-24,
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-10,
|
||||
Bernd Tegge (<email>tegge@repas-aeg.de</email>)
|
||||
</entry>
|
||||
<entry>see also <filename>doc/FAQ_QNX4</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">QNX 6</></entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-10,
|
||||
Igor Kovalenko (<email>Igor.Kovalenko@motorola.com</email>)
|
||||
</entry>
|
||||
<entry>Requires patches for Posix semaphores; see archives</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Solaris</></entry>
|
||||
@ -1587,22 +1613,43 @@ gunzip -c user.ps.gz \
|
||||
Martin Renters (<email>martin@datafax.com</email>)</entry>
|
||||
<entry>2.8; see also <filename>doc/FAQ_Solaris</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">SunOS</></entry>
|
||||
<entry><systemitem>Sparc</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-04, Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>)</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Tru64 UNIX</></entry>
|
||||
<entry><systemitem>Alpha</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-11-26,
|
||||
Alessio Bragadini (<email>alessio@albourne.com</email>)</entry>
|
||||
<entry>4.0g, with cc and gcc</entry>
|
||||
Alessio Bragadini (<email>alessio@albourne.com</email>),
|
||||
Bernd Tegge (<email>tegge@repas-aeg.de</email>)</entry>
|
||||
<entry>5.0; 4.0g with cc and gcc</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Windows NT/2000</></entry>
|
||||
<entry><systemitem class="osname">Windows</></entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>7.1</entry>
|
||||
<entry>2001-03-16,
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-13,
|
||||
Dave Page (<email>dpage@vale-housing.co.uk</email>),
|
||||
Jason Tishler (<email>jason@tishler.net</email>)</entry>
|
||||
<entry>with <application>Cygwin</application> tool set, see <filename>doc/FAQ_MSWIN</filename></entry>
|
||||
<entry>with <application>Cygwin</application>; see <filename>doc/FAQ_MSWIN</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Windows</></entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-10,
|
||||
Dave Page (<email>dpage@vale-housing.co.uk</email>)</entry>
|
||||
<entry>
|
||||
native is client-side only;
|
||||
<![%standalone-include[see Administrator's Guide]]>
|
||||
<![%standalone-ignore[see <xref linkend="install-win32">]]>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
@ -1668,14 +1715,7 @@ Obsolete platform? This distro was merged into PPC afaik. - thomas 2001-12-07
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>6.5</entry>
|
||||
<entry>1999-05-25, Andrew Merrill (<email>andrew@compclass.com</>)</entry>
|
||||
<entry>7.2 should work, but no reports; see also <filename>doc/FAQ_SCO</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">SunOS</></entry>
|
||||
<entry><systemitem>Sparc</></entry>
|
||||
<entry>7.2</entry>
|
||||
<entry>2001-12-04, Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>)</entry>
|
||||
<entry><function>memcmp()</> does not work correctly, so probably not reliable</entry>
|
||||
<entry>&version; should work, but no reports; see also <filename>doc/FAQ_SCO</filename></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">System V R4</></entry>
|
||||
@ -1703,24 +1743,11 @@ Obsolete platform? This distro was merged into PPC afaik. - thomas 2001-12-07
|
||||
<entry><systemitem>VAX</></entry>
|
||||
<entry>6.x</entry>
|
||||
<entry>1998-03-01</entry>
|
||||
<entry>no recent reports</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><systemitem class="osname">Windows 9x, ME, NT, 2000</> (native)</entry>
|
||||
<entry><systemitem>x86</></entry>
|
||||
<entry>7.1</entry>
|
||||
<entry>2001-03-26, Magnus Hagander (<email>mha@sollentuna.net</email>)</entry>
|
||||
<entry>
|
||||
client-side libraries (<application>libpq</> and <application>psql</>) or ODBC or JDBC, no server-side;
|
||||
<![%standalone-include[see <citetitle>Administrator's Guide</>]]>
|
||||
<![%standalone-ignore[see <xref linkend="install-win32">]]>
|
||||
for instructions
|
||||
</entry>
|
||||
<entry></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
|
Loading…
x
Reference in New Issue
Block a user