Commit 68cb184b authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Update list of currently supported platforms.

Mention SQL9x precision syntax for date/time types.
Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
 between Postgres and PostgreSQL.
parent aa82ac8a
......@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.45 2001/11/18 20:35:02 petere Exp $
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.46 2001/12/08 03:24:21 thomas Exp $
#
#----------------------------------------------------------------------------
......@@ -96,16 +96,27 @@ programmer.html: catalogs.gif connections.gif
postgres.html: catalogs.gif connections.gif
COLLATEINDEX = $(PERL) $(DOCBOOKSTYLE)/bin/collateindex.pl -f -g -t 'Index'
#COLLATEINDEX = $(PERL) $(DOCBOOKSTYLE)/bin/collateindex.pl -f -g -t 'Index'
COLLATEINDEX = $(PERL) /usr/bin/collateindex.pl -f -g -t 'Index'
ifeq (,$(wildcard HTML.index))
bookindex.sgml:
ifeq (,$(wildcard $(COLLATEINDEX)))
touch $@
else
$(COLLATEINDEX) -o $@ -N
endif
setindex.sgml:
ifeq (,$(wildcard $(COLLATEINDEX)))
touch $@
else
$(COLLATEINDEX) -x -o $@ -N
endif
else
bookindex.sgml: HTML.index
$(COLLATEINDEX) -i 'bookindex' -o $@ $<
setindex.sgml: HTML.index
$(COLLATEINDEX) -i 'setindex' -x -o $@ $<
endif
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.20 2001/11/21 05:53:40 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.21 2001/12/08 03:24:22 thomas Exp $
CVS code repository
Thomas Lockhart
-->
......@@ -409,12 +409,12 @@ $ cvsup -L 2 <replaceable class="parameter">postgres.cvsup</replaceable>
# at the date specified below
#*default date=97.08.29.00.00.00
# base directory points to where CVSup will store its 'bookmarks' file(s)
# base directory where CVSup will store its 'bookmarks' file(s)
# will create subdirectory sup/
#*default base=/opt/postgres # /usr/local/pgsql
*default base=/home/cvs
# prefix directory points to where CVSup will store the actual distribution(s)
# prefix directory where CVSup will store the actual distribution(s)
*default prefix=/home/cvs
# complete distribution, including all below
......@@ -444,10 +444,10 @@ pgsql
*default delete use-rel-suffix
*default tag=.
# base directory points to where CVSup will store its 'bookmarks' file(s)
# base directory where CVSup will store its 'bookmarks' file(s)
*default base=<replaceable class="parameter">/usr/local/pgsql</replaceable>
# prefix directory points to where CVSup will store the actual distribution(s)
# prefix directory where CVSup will store the actual distribution(s)
*default prefix=<replaceable class="parameter">/usr/local/pgsql</replaceable>
# complete distribution, including all below
......
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.77 2001/11/28 20:49:09 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.78 2001/12/08 03:24:22 thomas Exp $
-->
<chapter id="datatype">
......@@ -219,25 +219,25 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.77 2001/11/28 20:49:09 pe
</row>
<row>
<entry><type>time [ without time zone ]</type></entry>
<entry><type>time [ (<replaceable>p</replaceable>) ] [ without time zone ]</type></entry>
<entry></entry>
<entry>time of day</entry>
</row>
<row>
<entry><type>time with time zone</type></entry>
<entry><type>time [ (<replaceable>p</replaceable>) ] with time zone</type></entry>
<entry><type>timetz</type></entry>
<entry>time of day, including time zone</entry>
</row>
<row>
<entry><type>timestamp without time zone</type></entry>
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] without time zone</type></entry>
<entry><type>timestamp</type></entry>
<entry>date and time</entry>
</row>
<row>
<entry><type>timestamp [ with time zone ]</type></entry>
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] [ with time zone ]</type></entry>
<entry><type>timestamptz</type></entry>
<entry>date and time, including time zone</entry>
</row>
......@@ -1274,7 +1274,7 @@ SELECT b, char_length(b) FROM test2;
</thead>
<tbody>
<row>
<entry><type>timestamp without time zone</type></entry>
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] without time zone</type></entry>
<entry>both date and time</entry>
<entry>8 bytes</entry>
<entry>4713 BC</entry>
......@@ -1282,7 +1282,7 @@ SELECT b, char_length(b) FROM test2;
<entry>1 microsecond / 14 digits</entry>
</row>
<row>
<entry><type>timestamp [ with time zone ]</type></entry>
<entry><type>timestamp [ (<replaceable>p</replaceable>) ] [ with time zone ]</type></entry>
<entry>both date and time</entry>
<entry>8 bytes</entry>
<entry>4713 BC</entry>
......@@ -1324,13 +1324,25 @@ SELECT b, char_length(b) FROM test2;
</tbody>
</tgroup>
</table>
</para>
<para>
<type>time</type> and <type>timestamp</type> both accept an
option 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>.
</para>
<note>
<para>
Time zones, and time-zone conventions, are influenced by
political conventions, not just physical effects. Time zones have
become somewhat standardized during the 1900's, but continue to
be prone to arbitrary changes with time.
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.
<productname>PostgreSQL</productname> uses your operating
system's underlying features to provide time-zone
support, and these systems usually contain information for only
......@@ -1340,12 +1352,10 @@ SELECT b, char_length(b) FROM test2;
information only within that year range, and assumes that times
are in UTC outside that range.
</para>
</note>
</para>
<para>
To ensure compatibility to earlier versions of <productname>PostgreSQL</productname>
we also continue to provide <type>datetime</type>
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
......@@ -1384,11 +1394,16 @@ SELECT b, char_length(b) FROM test2;
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.
SQL requires the following syntax
<acronym>SQL9x</acronym> requires the following syntax
<synopsis>
<replaceable>type</replaceable> '<replaceable>value</replaceable>'
<replaceable>type</replaceable> [ (<replaceable>p</replaceable>) ] '<replaceable>value</replaceable>'
</synopsis>
but <productname>PostgreSQL</productname> is more flexible.
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.
</para>
<sect3>
......@@ -1569,7 +1584,7 @@ SELECT b, char_length(b) FROM test2;
</sect3>
<sect3>
<title><type>time [ without time zone ]</type></title>
<title><type>time [ ( <replaceable>p</replaceable> ) ] [ without time zone ]</type></title>
<indexterm>
<primary>time</primary>
......@@ -1581,8 +1596,10 @@ SELECT b, char_length(b) FROM test2;
</indexterm>
<para>
Per SQL99, this type can be referenced as <type>time</type> and
as <type>time without time zone</type>.
Per SQL99, this type can be specified as <type>time</type> or
as <type>time without time zone</type>. The optional precision
<replaceable>p</replaceable> should be between 0 and 13, and
defaults to the precision of the input time literal.
</para>
<para>
......@@ -1641,7 +1658,7 @@ SELECT b, char_length(b) FROM test2;
</sect3>
<sect3>
<title><type>time with time zone</type></title>
<title><type>time [ ( <replaceable>precision</replaceable> ) ] with time zone</type></title>
<indexterm>
<primary>time with time zone</primary>
......@@ -1662,6 +1679,12 @@ SELECT b, char_length(b) FROM test2;
required by any application.
</para>
<para>
The optional precision
<replaceable>p</replaceable> should be between 0 and 13, and
defaults to the precision of the input time literal.
</para>
<para>
<type>time with time zone</type> accepts all input also legal
for the <type>time</type> type, appended with a legal time zone,
......@@ -1705,7 +1728,7 @@ SELECT b, char_length(b) FROM test2;
</sect3>
<sect3>
<title><type>timestamp without time zone</type></title>
<title><type>timestamp [ (<replaceable>precision</replaceable>) ] without time zone</type></title>
<indexterm>
<primary>timestamp without time zone</primary>
......@@ -1713,7 +1736,7 @@ SELECT b, char_length(b) FROM test2;
</indexterm>
<para>
Valid input for the <type>timestamp without time zone</type>
Valid input for the <type>timestamp [ (<replaceable>p</replaceable>) ] without time zone</type>
type consists of a concatenation
of a date and a time, followed by an optional <literal>AD</literal> or
<literal>BC</literal>, followed by an optional time zone. (See below.)
......@@ -1733,6 +1756,12 @@ January 8 04:05:06 1999 PST
is supported.
</para>
<para>
The optional precision
<replaceable>p</replaceable> should be between 0 and 13, and
defaults to the precision of the input <type>timestamp</type> literal.
</para>
<para>
For <type>timestamp without time zone</type>, any explicit time
zone specified in the input is silently swallowed. That is, the
......@@ -1742,7 +1771,7 @@ January 8 04:05:06 1999 PST
</sect3>
<sect3>
<title><type>timestamp with time zone</type></title>
<title><type>timestamp [ (<replaceable>precision</replaceable>) ] with time zone</type></title>
<indexterm>
<primary>timestamp</primary>
......@@ -1768,6 +1797,12 @@ January 8 04:05:06 1999 PST
is supported.
</para>
<para>
The optional precision
<replaceable>p</replaceable> should be between 0 and 13, and
defaults to the precision of the input <type>timestamp</type> literal.
</para>
<para>
<table tocentry="1" id="datatype-timezone-table">
<title>Time Zone Input</title>
......@@ -1852,7 +1887,9 @@ January 8 04:05:06 1999 PST
The following <acronym>SQL</acronym>-compatible functions can be
used as date or time
input for the corresponding data type: <literal>CURRENT_DATE</literal>,
<literal>CURRENT_TIME</literal>, <literal>CURRENT_TIMESTAMP</literal>.
<literal>CURRENT_TIME</literal>,
<literal>CURRENT_TIMESTAMP</literal>. The latter two accept an
optional precision specification.
</para>
<para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.36 2001/11/21 05:53:41 thomas Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.37 2001/12/08 03:24:22 thomas Exp $ -->
<appendix id="docguide">
<title>Documentation</title>
......@@ -682,7 +682,7 @@ gmake man
<para>
The hardcopy Postscript documentation is generated by converting the
<acronym>SGML</acronym> source code to <acronym>RTF</acronym>, then
importing into <productname>ApplixWare-4.4.1</productname>.
importing into <productname>ApplixWare</productname>.
After a little cleanup (see the following
section) the output is <quote>printed</quote> to a postscript file.
</para>
......@@ -735,28 +735,35 @@ gmake man
<step performance="required">
<para>
Repair the RTF file to correctly specify all
styles, in particular the default style. The field can be added
using <application>vi</application> or the following small
<application>sed</application> procedure:
styles, in particular the default style. If the document
contains <sgmltag>REFENTRY</sgmltag> sections, one must also
replace formatting hints which tie a
<emphasis>preceeding</emphasis> paragraph to the current
paragraph, and instead tie the current paragraph to the
following one. A utility, <application>fixrtf</application> is
available in
<filename>doc/src/sgml</filename> to accomplish these repairs:
<programlisting>
#!/bin/sh
# fixrtf.sh
# Utility to repair slight damage in RTF files generated by jade
# Thomas Lockhart &lt;lockhart@alumni.caltech.edu&gt;
#
for i in $* ; do
mv $i $i.orig
cat $i.orig | sed 's#\\stylesheet#\\stylesheet{\\s0 Normal;}#' > $i
done
exit
% cd doc/src/sgml
% fixrtf tutorial.rtf
</programlisting>
where the script is adding <literal>{\s0 Normal;}</literal> as
or
<programlisting>
% cd doc/src/sgml
% fixrtf --refentry reference.rtf
</programlisting>
</para>
<para>
The script adds <literal>{\s0 Normal;}</literal> as
the zero-th style in the document. According to ApplixWare, the
RTF standard would prohibit adding an implicit zero-th style,
though M$Word happens to handle this case.
though M$Word happens to handle this case. For repairing
<sgmltag>REFENTRY</sgmltag> sections, the script replaces
<literal>\keepn</literal> tags with <literal>\keep</literal>.
</para>
</step>
......@@ -822,10 +829,10 @@ exit
<literal>TOC-Heading 1</literal>
</entry>
<entry>
<literal>0.6</literal>
<literal>0.4</literal>
</entry>
<entry>
<literal>0.6</literal>
<literal>0.4</literal>
</entry>
</row>
......@@ -834,10 +841,10 @@ exit
<literal>TOC-Heading 2</literal>
</entry>
<entry>
<literal>1.0</literal>
<literal>0.8</literal>
</entry>
<entry>
<literal>1.0</literal>
<literal>0.8</literal>
</entry>
</row>
......@@ -846,10 +853,10 @@ exit
<literal>TOC-Heading 3</literal>
</entry>
<entry>
<literal>1.4</literal>
<literal>1.2</literal>
</entry>
<entry>
<literal>1.4</literal>
<literal>1.2</literal>
</entry>
</row>
</tbody>
......@@ -905,6 +912,8 @@ exit
</para>
</step>
<!--
Later stylesheets seem to not need this adjustment - thomas 2001-11-29
<step performance="required">
<para>
If a bibliography is present, remove the <firstterm>short
......@@ -914,6 +923,49 @@ exit
information immediately following.
</para>
</step>
-->
<step performance="optional">
<para>
Delete the index section from the document if it is empty.
</para>
</step>
<step performance="required">
<para>
Regenerate and adjust the table of contents.
</para>
<substeps>
<step>
<para>
Select the ToC field.
</para>
</step>
<step>
<para>
Select
<literal>Tools->Book Building->Create Table of
Contents</literal>.
</para>
</step>
<step>
<para>
Unbind the ToC by selecting
<literal>Tools->Field Editing->Unprotect</literal>.
</para>
</step>
<step>
<para>
Delete the first line in the ToC, which is an entry for the
ToC itself.
</para>
</step>
</substeps>
</step>
<step performance="required">
<para>
......
This diff is collapsed.
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.54 2001/12/01 04:19:20 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.55 2001/12/08 03:24:23 thomas Exp $
-->
<chapter id="sql-syntax">
......@@ -265,7 +265,8 @@ SELECT 'foobar';
<programlisting>
SELECT 'foo' 'bar';
</programlisting>
is not valid syntax.
is not valid syntax, and <productname>PostgreSQL</productname> is
consistant with <acronym>SQL9x</acronym> in this regard.
</para>
</sect3>
......@@ -293,7 +294,7 @@ SELECT 'foo' 'bar';
<para>
Integer constants in SQL are sequences of decimal digits (0
though 9) with no decimal point. The range of legal values
though 9) with no decimal point and no exponent. The range of legal values
depends on which integer data type is used, but the plain
<type>integer</type> type accepts values ranging from -2147483648
to +2147483647. (The optional plus or minus sign is actually a
......@@ -318,7 +319,8 @@ SELECT 'foo' 'bar';
</synopsis>
where <replaceable>digits</replaceable> is one or more decimal
digits. At least one digit must be before or after the decimal
point, and after the <literal>e</literal> if you use that option.
point. At least one digit must follow the exponent delimiter
(<literal>e</literal>) if that field is present.
Thus, a floating point constant is distinguished from an integer
constant by the presence of either the decimal point or the
exponent clause (or both). There must not be a space or other
......@@ -328,13 +330,13 @@ SELECT 'foo' 'bar';
<informalexample>
<para>
These are some examples of valid floating point constants:
<literallayout>
<literallayout>
3.5
4.
.001
5e2
1.925e-3
</literallayout>
</literallayout>
</para>
</informalexample>
......@@ -344,9 +346,9 @@ SELECT 'foo' 'bar';
by using <acronym>SQL</acronym> string notation or
<productname>PostgreSQL</productname> type notation:
<programlisting>
<programlisting>
REAL '1.23' -- string style
'1.23'::REAL -- Postgres (historical) style
'1.23'::REAL -- PostgreSQL (historical) style
</programlisting>
</para>
</sect3>
......
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