Commit dd0279b1 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Document the precision arguments for date/time types per SQL9x.

Update the list of recognized time zones.
Document the range of arguments allowed for SET TIME ZONE.
Still need to add info on other date/time symbols (e.g. "AM", "T")
 and to freshen the docs on the date/time parsing rules.
parent b5e23db4
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.80 2001/12/23 20:21:37 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.81 2001/12/29 18:35:46 thomas Exp $
-->
<chapter id="datatype">
......@@ -135,7 +135,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.80 2001/12/23 20:21:37 tg
</row>
<row>
<entry><type>interval</type></entry>
<entry><type>interval(<replaceable>p</replaceable>)</type></entry>
<entry></entry>
<entry>general-use time span</entry>
</row>
......@@ -165,8 +165,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.80 2001/12/23 20:21:37 tg
</row>
<row>
<entry><type>numeric(<replaceable>p</replaceable>, <replaceable>s</replaceable>)</type></entry>
<entry><type>decimal(<replaceable>p</replaceable>, <replaceable>s</replaceable>)</type></entry>
<entry><type>numeric [ (<replaceable>p</replaceable>,
<replaceable>s</replaceable>) ]</type></entry>
<entry><type>decimal [ (<replaceable>p</replaceable>,
<replaceable>s</replaceable>) ]</type></entry>
<entry>exact numeric with selectable precision</entry>
</row>
......@@ -1306,7 +1308,7 @@ SELECT b, char_length(b) FROM test2;
<entry>1 day</entry>
</row>
<row>
<entry><type>time [ without time zone ]</type></entry>
<entry><type>time [ (<replaceable>p</replaceable>) ] [ without time zone ]</type></entry>
<entry>times of day only</entry>
<entry>8 bytes</entry>
<entry>00:00:00.00</entry>
......@@ -1314,7 +1316,7 @@ SELECT b, char_length(b) FROM test2;
<entry>1 microsecond</entry>
</row>
<row>
<entry><type>time with time zone</type></entry>
<entry><type>time [ (<replaceable>p</replaceable>) ] with time zone</type></entry>
<entry>times of day only</entry>
<entry>12 bytes</entry>
<entry>00:00:00.00+12</entry>
......@@ -2164,7 +2166,7 @@ January 8 04:05:06 1999 PST
<productname>PostgreSQL</productname> for legacy applications and
for compatibility with other RDBMS implementations).
<productname>PostgreSQL</productname>
assumes local time for any type containing only
assumes your local time zone for any type containing only
date or time. Further, time zone support is derived from
the underlying operating system
time-zone capabilities, and hence can handle daylight-saving time
......
This diff is collapsed.
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.54 2001/12/08 03:24:39 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.55 2001/12/29 18:35:54 thomas Exp $
PostgreSQL documentation
-->
......@@ -235,6 +235,13 @@ SELECT setseed(<replaceable>value</replaceable>);
<term>TIME ZONE</term>
<term>TIMEZONE</term>
<listitem>
<para>
Sets the default time zone for your session. Arguments can be
an SQL time interval constant, an integer or double precision
constant, or a string representing a time zone supported by
the host operating system.
</para>
<para>
The possible values for time zone depends on your operating
system. For example, on Linux
......@@ -243,10 +250,10 @@ SELECT setseed(<replaceable>value</replaceable>);
</para>
<para>
Here are some valid values for time zone:
<variablelist>
<variablelist>
<varlistentry>
<term>PST8PDT</term>
<term>'PST8PDT'</term>
<listitem>
<para>
Set the time zone for California.
......@@ -254,10 +261,10 @@ SELECT setseed(<replaceable>value</replaceable>);
</listitem>
</varlistentry>
<varlistentry>
<term>Portugal</term>
<term>'Portugal'</term>
<listitem>
<para>
Set time zone for Portugal.
Set the time zone for Portugal.
</para>
</listitem>
</varlistentry>
......@@ -265,7 +272,24 @@ SELECT setseed(<replaceable>value</replaceable>);
<term>'Europe/Rome'</term>
<listitem>
<para>
Set time zone for Italy.
Set the time zone for Italy.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>7</term>
<listitem>
<para>
Set the time zone to 7 hours offset west from GMT (equivalent
to PDT).
</para>
</listitem>
</varlistentry>
<term>INTERVAL '08:00' HOUR TO MINUTE</term>
<listitem>
<para>
Set the time zone to 8 hours offset west from GMT (equivalent
to PST).
</para>
</listitem>
</varlistentry>
......@@ -286,9 +310,9 @@ SELECT setseed(<replaceable>value</replaceable>);
becomes GMT (on most systems anyway).
</para>
<para>
If the PGTZ environment variable is set in the frontend
If the <envar>PGTZ</envar> environment variable is set in the frontend
environment of a client based on libpq, libpq will automatically
set TIMEZONE to the value of PGTZ during connection start-up.
set TIMEZONE to the value of <envar>PGTZ</envar> during connection start-up.
</para>
</listitem>
</varlistentry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment