Bunch of copy fitting and style sheet tweakage to get decent looking print

output (from pdfjadetex).  Also updated instructions to install documentation
processing toolchain.
This commit is contained in:
Peter Eisentraut 2001-10-09 18:46:00 +00:00
parent 2f1c24cb1c
commit ffb8f73890
26 changed files with 478 additions and 383 deletions

View File

@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.41 2001/10/04 22:25:48 petere Exp $
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.42 2001/10/09 18:45:59 petere Exp $
#
#----------------------------------------------------------------------------
@ -123,6 +123,9 @@ $(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl
# TeX transforms '--' into en-dashes. This hack should go away when
# OpenJade is fixed (ver. 1.4?)
$(PERL) -pi -e 's/\-\-/\\mbox{}-\\mbox{}-\\mbox{}/g' $@
$(PERL) -pi -e 's/\<\</\\mbox{}<\\mbox{}<\\mbox{}/g' $@
$(PERL) -pi -e 's/\>\>/\\mbox{}>\\mbox{}>\\mbox{}/g' $@
$(PERL) -pi -e "s/\'\'/\\\\mbox{}'\\\\mbox{}'\\\\mbox{}/g" $@
%.dvi: %.tex
jadetex $<

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.11 2001/10/04 22:26:27 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.12 2001/10/09 18:45:59 petere Exp $ -->
<chapter id="charset">
<title>Localization</>
@ -293,7 +293,7 @@ perl: warning: Falling back to the standard locale ("C").
values in the following table:
<table tocentry="1">
<title><productname>Postgres</productname> Character Set Encodings</title>
<title>Character Set Encodings</title>
<titleabbrev>Encodings</titleabbrev>
<tgroup cols="2">
<thead>
@ -451,7 +451,7 @@ $ psql -l
and frontend for some encodings.
<table tocentry="1">
<title><productname>Postgres</productname> Client/Server Character Set Encodings</title>
<title>Client/Server Character Set Encodings</title>
<titleabbrev>Communication Encodings</titleabbrev>
<tgroup cols="2">
<thead>
@ -618,38 +618,47 @@ RESET CLIENT_ENCODING;
These are good sources to start learning about various kinds of encoding
systems.
<itemizedlist>
<listitem>
<para>
<ulink url="ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf"
>ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf</ulink>
Detailed explanations of <literal>EUC_JP</literal>, <literal>EUC_CN</literal>, <literal>EUC_KR</literal>, <literal>EUC_TW</literal>
appear in section 3.2.
</para>
</listitem>
<variablelist>
<varlistentry>
<term><ulink url="ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf"
>ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf</ulink></term>
<listitem>
<para>
Unicode: <ulink url="http://www.unicode.org/">http://www.unicode.org/</ulink>
The homepage of Unicode.
</para>
</listitem>
<listitem>
<para>
Detailed explanations of <literal>EUC_JP</literal>,
<literal>EUC_CN</literal>, <literal>EUC_KR</literal>,
<literal>EUC_TW</literal> appear in section 3.2.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
<literal>RFC 2044</literal>
<literal>UTF</literal>-8 is defined here.
</para>
</listitem>
</itemizedlist>
<varlistentry>
<term><ulink url="http://www.unicode.org/">http://www.unicode.org/</ulink></term>
<listitem>
<para>
The web site of the Unicode Consortium
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RFC 2044</term>
<listitem>
<para>
<acronym>UTF</acronym>-8 is defined here.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
<sect2>
<title>History</title>
<para>
<programlisting>
<literallayout class="monospaced">
Dec 7, 2000
* An automatic encoding translation between Unicode and other
encodings are implemented
@ -728,8 +737,7 @@ Mar 10, 1998 PL2 released
* fix problems concerning 8-bit single byte characters
Mar 1, 1998 PL1 released
</programlisting>
</para>
</literallayout>
</sect2>
<sect2>

View File

@ -1,10 +1,10 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.18 2001/09/23 01:16:35 momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/cvs.sgml,v 1.19 2001/10/09 18:45:59 petere Exp $
CVS code repository
Thomas Lockhart
-->
<appendix label="DG1" id="cvs">
<appendix id="cvs">
<docinfo>
<authorgroup>
<author>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.65 2001/10/03 05:24:22 thomas Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.66 2001/10/09 18:45:59 petere Exp $
-->
<chapter id="datatype">
@ -168,8 +168,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.65 2001/10/03 05:24:22 th
</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>
@ -648,30 +648,33 @@ NUMERIC
In the current implementation, specifying
<programlisting>
CREATE TABLE <replaceable class="parameter">tablename</replaceable> (<replaceable class="parameter">colname</replaceable> SERIAL);
CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
<replaceable class="parameter">colname</replaceable> SERIAL
);
</programlisting>
is equivalent to specifying:
<programlisting>
CREATE SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq;
CREATE TABLE <replaceable class="parameter">tablename</replaceable>
(<replaceable class="parameter">colname</replaceable> integer DEFAULT nextval('<replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq') UNIQUE NOT NULL);
CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
<replaceable class="parameter">colname</replaceable> integer DEFAULT nextval('<replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq') UNIQUE NOT NULL
);
</programlisting>
Thus, we have created an integer column and arranged for its default
values to be assigned from a sequence generator. UNIQUE and NOT NULL
constraints are applied to ensure that explicitly-inserted values
will never be duplicates, either.
</para>
<caution>
<important>
<para>
The implicit sequence created for the <type>serial</type> type will
<emphasis>not</emphasis> be automatically removed when the
table is dropped.
</para>
</caution>
</para>
</important>
<para>
The type names <type>serial</type> and <type>serial4</type> are
@ -974,7 +977,7 @@ SELECT b, char_length(b) FROM test2;
<para>
<table tocentry="1">
<title>Date/Time Types</title>
<tgroup cols="4">
<tgroup cols="6">
<thead>
<row>
<entry>Type</entry>
@ -2563,18 +2566,25 @@ SELECT * FROM test1 WHERE a;
The <type>macaddr</> type stores MAC addresses, i.e., Ethernet
card hardware addresses (although MAC addresses are used for
other purposes as well). Input is accepted in various customary
formats, including <literal>'08002b:010203'</>,
<literal>'08002b-010203'</>, <literal>'0800.2b01.0203'</>,
<literal>'08-00-2b-01-02-03'</>, and
<literal>'08:00:2b:01:02:03'</>, which would all specify the same
formats, including
<simplelist>
<member><literal>'08002b:010203'</></member>
<member><literal>'08002b-010203'</></member>
<member><literal>'0800.2b01.0203'</></member>
<member><literal>'08-00-2b-01-02-03'</></member>
<member><literal>'08:00:2b:01:02:03'</></member>
</simplelist>
which would all specify the same
address. Upper and lower case is accepted for the digits
<literal>a</> through <literal>f</>. Output is always in the
latter of the given forms.
last of the shown forms.
</para>
<para>
The directory <filename class="directory">contrib/mac</filename>
in the <productname>Postgres</productname> source distribution
in the <productname>PostgreSQL</productname> source distribution
contains tools that can be used to map MAC addresses to hardware
manufacturer names.
</para>

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/developer.sgml,v 1.5 2001/06/02 18:25:16 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/developer.sgml,v 1.6 2001/10/09 18:45:59 petere Exp $ -->
<!-- PostgreSQL Developer's Guide -->
<book id="developer">
@ -9,10 +9,10 @@
&legal;
<abstract>
<simpara>
<para>
This document contains assorted information that can be of use to
<productname>PostgreSQL</> developers.
</simpara>
</para>
</abstract>
</bookinfo>
@ -25,10 +25,10 @@
&page;
&geqo;
&nls;
<![%single-book;[
&biblio;
]]>
<!-- appendices -->
&cvs;
&docguide;
<![%single-book;[
&biblio;
]]>
</book>

View File

@ -1,6 +1,6 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.34 2001/09/21 18:37:05 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v 1.35 2001/10/09 18:45:59 petere Exp $ -->
<appendix label="DG2" id="docguide">
<appendix id="docguide">
<title>Documentation</title>
<para>
@ -46,12 +46,12 @@
</listitem>
<listitem>
<para>
<citetitle>User's Guide</citetitle>: documents the query language environment
<citetitle>User's Guide</citetitle>: documents the SQL implementation
</para>
</listitem>
<listitem>
<para>
<citetitle>Reference Manual</citetitle>: documents the query language
<citetitle>Reference Manual</citetitle>: reference pages for programs and SQL commands
</para>
</listitem>
<listitem>
@ -146,7 +146,7 @@
</varlistentry>
<varlistentry>
<term><ulink url="http://openjade.sourceforge.net">Jade</ulink></term>
<term><ulink url="http://openjade.sourceforge.net">OpenJade</ulink></term>
<listitem>
<para>
This is the base package of <acronym>SGML</acronym> processing.
@ -161,7 +161,7 @@
</varlistentry>
<varlistentry>
<term><ulink url="http://nwalsh.com/docbook/dsssl/index.html">Norm Walsh's Modular DocBook Stylesheets</ulink></term>
<term><ulink url="http://docbook.sourceforge.net/projects/dsssl/index.html">DocBook DSSSL Stylesheets</ulink></term>
<listitem>
<para>
These contain the processing instructions for converting the
@ -183,21 +183,23 @@
</varlistentry>
<varlistentry>
<term>JadeTeX</term>
<term><ulink url="http://jadetex.sourceforge.net">JadeTeX</ulink></term>
<listitem>
<para>
If you want to, you can also install
<productname>JadeTeX</productname> to use
<productname>TeX</productname> as a formatting backend for
<productname>Jade</productname>. This will generate printed
output that is inferior to what you get from the
<acronym>RTF</acronym> backend. Tables are a particular
problem area. Also, there is no opportunity to manually polish
the results. Still, it works all right, especially for simpler
documents that don't use tables, and as both
<productname>JadeTeX</productname> and the style sheets are
under continuous improvement, it will certainly get better over
time.
<productname>Jade</productname>.
<application>JadeTeX</application> can create Postscript or
<acronym>PDF</acronym> files (the latter with bookmarks).
</para>
<para>
However, the output from <application>JadeTeX</application> is
inferior to what you get from the <acronym>RTF</acronym>
backend. Particular problem areas are tables and various
artifacts of vertical and horizontal spacing. Also, there is
no opportunity to manually polish the results.
</para>
</listitem>
</varlistentry>
@ -226,7 +228,7 @@
(or <filename>jade</filename>). Possibly
<filename>sgml-tools</filename> will be needed as well. If your
distributor does not provide these then you should be able to make
use of the packages from some large, reasonably compatible vendor.
use of the packages from some other, reasonably compatible vendor.
</para>
</sect2>
@ -309,34 +311,60 @@ apt-get install docbook-stylesheets
</para>
<sect3>
<title>Installing Jade</title>
<title>Installing OpenJade</title>
<para>
The installation of OpenJade offers a GNU-style
<literal>./configure; make; make install</literal> build process.
Details can be found in the OpenJade source distribution. In a
nutshell:
<procedure>
<step>
<para>
The installation of OpenJade offers a GNU-style
<literal>./configure; make; make install</literal> build
process. Details can be found in the OpenJade source
distribution. In a nutshell:
<synopsis>
./configure --enable-default-catalog=/usr/local/share/sgml/catalog
make
make install
</synopsis>
Be sure to remember where you put the <quote>default
catalog</quote>; you will need it below. You can also leave it
off, but then you will have to set the environment variable
<envar>SGML_CATALOG_FILES</envar> to point to the file whenever
you use <application>jade</application> later on.
</para>
Be sure to remember where you put the <quote>default
catalog</quote>; you will need it below. You can also leave
it off, but then you will have to set the environment variable
<envar>SGML_CATALOG_FILES</envar> to point to the file
whenever you use <application>jade</application> later on.
(This method is also an option if OpenJade is already
installed and you want to install the rest of the toolchain
locally.)
</para>
</step>
<para>
Additionally, you should install the files
<filename>dsssl.dtd</filename>, <filename>fot.dtd</filename>,
<filename>style-sheet.dtd</filename>, and
<filename>catalog</filename> from the <filename>dsssl</filename>
directory somewhere, perhaps into
<filename>/usr/local/share/sgml/dsssl</filename>. (Or just copy
the entire directory.)
</para>
<step id="doc-openjade-install">
<para>
Additionally, you should install the files
<filename>dsssl.dtd</filename>, <filename>fot.dtd</filename>,
<filename>style-sheet.dtd</filename>, and
<filename>catalog</filename> from the
<filename>dsssl</filename> directory somewhere, perhaps into
<filename>/usr/local/share/sgml/dsssl</filename>. It's
probably easiest to copy the entire directory:
<synopsis>
cp -R dsssl /usr/local/share/sgml
</synopsis>
</para>
</step>
<step>
<para>
Finally, create the file
<filename>/usr/local/share/sgml/catalog</filename> and add
this line to it:
<programlisting>
CATALOG "dsssl/catalog"
</programlisting>
(This is a relative path reference to the file installed in
<xref linkend="doc-openjade-install">. Be sure to adjust it
if you chose your installation layout differently.)
</para>
</step>
</procedure>
</sect3>
<sect3>
@ -353,24 +381,30 @@ make install
<step>
<para>
Unpack the archive.
Create the directory
<filename>/usr/local/share/sgml/docbook31</filename> and change
to it. (The exact location is irrelevant, but this one is
reasonable within the layout we are following here.)
<screen>
<prompt>$ </prompt><userinput>unzip -a docbk31.zip</userinput>
<prompt>$ </prompt><userinput>mkdir /usr/local/share/sgml/docbook31</userinput>
<prompt>$ </prompt><userinput>cd /usr/local/share/sgml/docbook31</userinput>
</screen>
</para>
</step>
<step>
<para>
Place the files into the directory
<filename>/usr/local/share/sgml/docbook31</filename>. (The
exact location is irrelevant, but this one is fairly standard.)
Unpack the archive.
<screen>
<prompt>$ </prompt><userinput>unzip -a ...../docbk31.zip</userinput>
</screen>
(The archive will unpack its files into the current directory.)
</para>
</step>
<step>
<para>
Create a file
Edit the file
<filename>/usr/local/share/sgml/catalog</filename> (or whatever
you told jade during installation) and put a line like this
into it:
@ -378,7 +412,9 @@ make install
CATALOG "docbook31/docbook.cat"
</programlisting>
</para>
</step>
<step>
<para>
Optionally, you can edit the file
<filename>docbook.cat</filename> and comment out or remove the
@ -394,20 +430,53 @@ CATALOG "docbook31/docbook.cat"
url="http://www.oasis-open.org/cover/ISOEnts.zip">ISO 8879
character entities</ulink> archive, unpack it, and put the
files in the same directory you put the DocBook files in.
<screen>
<prompt>$ </prompt><userinput>cd /usr/local/share/sgml/docbook31</userinput>
<prompt>$ </prompt><userinput>unzip ...../ISOEnts.zip</userinput>
</screen>
</para>
</step>
<step>
<para>
Run the following command in the directory with the DocBook and ISO files:
<programlisting>
perl -pi -e 's/iso-(.*).gml/ISO\1/g' docbook.cat
</programlisting>
(This fixes a mixup between the names used in the DocBook
catalog file and the actual names of the ISO character entity
files.)
</para>
</step>
</procedure>
</sect3>
<sect3>
<title>Installing Norman Walsh's <acronym>DSSSL</acronym> Style Sheets</title>
<title>Installing the DocBook <acronym>DSSSL</acronym> Style Sheets</title>
<para>
To install the style sheets, simply unzip the distribution kit in
a suitable place, for example
<filename>/usr/local/share/sgml/stylesheets</filename>. (The
archive will automatically create a <filename>docbook</filename>
subdirectory.)
To install the style sheets, unzip and untar the distribution and
move it to a suitable place, for example
<filename>/usr/local/share/sgml</filename>. (The archive will
automatically create a subdirectory.)
<screen>
<prompt>$</prompt> <userinput>gunzip docbook-dsssl-1.<replaceable>xx</>.tar.gz</userinput>
<prompt>$</prompt> <userinput>tar -C /usr/local/share/sgml -xf docbook-dsssl-1.<replaceable>xx</>.tar</userinput>
</screen>
</para>
<para>
The usual catalog entry in
<filename>/usr/local/share/sgml/catalog</filename> can also be
made:
<programlisting>
CATALOG "docbook-dsssl--1.<replaceable>xx</>/catalog
</programlisting>
Because stylesheets change rather often, and it's sometimes
beneficial to try out alternative versions,
<productname>PostgreSQL</productname> doesn't use this catalog
entry. See <xref linkend="doc-build"> for information about how
to select the stylesheets instead.
</para>
</sect3>
@ -431,45 +500,34 @@ CATALOG "docbook31/docbook.cat"
<productname>hyperref</productname>,
<productname>minitoc</productname>,
<productname>url</productname> and
<productname>ot2enc</productname>, and of course
<productname>JadeTeX</productname> itself. All of these can be
found on your friendly neighborhood <ulink
<productname>ot2enc</productname>. All of these can be found on
your friendly neighborhood <ulink
url="http://www.ctan.org"><acronym>CTAN</acronym></ulink> site.
The installation of the <application>TeX</application> base
system is far beyond the scope of this introduction. Binary
packages should be available for any system that can run
<application>TeX</application>.
</para>
<para>
<productname>JadeTeX</productname> does not at the time of
writing come with much of an installation guide, but there is a
<filename>makefile</filename> that shows what is needed. It
also includes a directory <filename>cooked</filename>, wherein
you'll find some of the macro packages it needs, but not all, and
not complete -- at least last we looked.
Before you can use <application>JadeTeX</application> with the
<productname>PostgreSQL</productname> documentation sources, you
will need to increase the size of
<application>TeX</application>'s internal data structures.
Details on this can be found in the <application>JadeTeX</application>
installation insructions.
</para>
<para>
Before building the <filename>jadetex.fmt</filename> format file,
you'll probably want to edit the <filename>jadetex.ltx</filename>
file, to change the configuration of
<productname>Babel</productname> to suit your locality. The line
to change looks something like
<programlisting>
\RequirePackage[german,french,english]{babel}[1997/01/23]
</programlisting>
and you should obviously list only the languages you actually need,
and have configured <productname>Babel</productname> for.
</para>
<para>
It is quite likely that when you use
<productname>JadeTeX</productname> with
<productname>PostgreSQL</productname> documentation sources, that
<productname>TeX</productname> will stop during the second run,
and tell you that its capacity has been exceeded. This is, as
far as we can tell, because of the way
<productname>JadeTeX</productname> generates cross referencing
information. <productname>TeX</productname> can, of course, be
compiled with larger data structure sizes. The details of this
will vary according to your installation.
Once that is finished you can install <application>JadeTeX</application>:
<screen>
<prompt>$</prompt> <userinput>gunzip jadetex-<replaceable>xxx</replaceable>.tar.gz</userinput>
<prompt>$</prompt> <userinput>tar xf jadetex-<replaceable>xxx</replaceable>.tar</userinput>
<prompt>$</prompt> <userinput>cd jadetex</userinput>
<prompt>$</prompt> <userinput>make install</userinput>
<prompt>$</prompt> <userinput>mktexlsr</userinput>
</screen>
The last two need to be done as <systemitem>root</systemitem>.
</para>
</sect3>
@ -1003,8 +1061,7 @@ exit
most common toolset is the
<productname>Emacs</productname>/<productname>XEmacs</productname>
editor with appropriate editing mode. On some systems
(e.g., RedHat Linux) these tools are provided in a typical full
installation.
these tools are provided in a typical full installation.
</para>
<sect2>

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.75 2001/09/28 20:48:17 thomas Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.76 2001/10/09 18:46:00 petere Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@ -1549,7 +1549,7 @@
<sect1 id="functions-formatting">
<title>Multi-type Formatting Functions</title>
<title>Data Type Formatting Functions</title>
<indexterm zone="functions-formatting">
<primary>formatting</primary>
@ -2280,7 +2280,7 @@
<table id="operators-datetime-table">
<title>Date/Time Operators</title>
<tgroup cols="4">
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
@ -2354,7 +2354,7 @@
<table id="functions-datetime-table">
<title>Date/Time Functions</title>
<tgroup cols="4">
<tgroup cols="5">
<thead>
<row>
<entry>Name</entry>
@ -3657,7 +3657,12 @@ END
3
</computeroutput>
<prompt>=&gt;</prompt> <userinput>SELECT a, CASE WHEN a=1 THEN 'one' WHEN a=2 THEN 'two' ELSE 'other' END FROM test;</userinput>
<prompt>=&gt;</prompt> <userinput>SELECT a,
CASE WHEN a=1 THEN 'one'
WHEN a=2 THEN 'two'
ELSE 'other'
END
FROM test;</userinput>
<computeroutput>
a | case
---+-------
@ -3699,7 +3704,12 @@ END
The example above can be written using the simple
<token>CASE</token> syntax:
<screen>
<prompt>=&gt;</prompt> <userinput>SELECT a, CASE a WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'other' END FROM test;</userinput>
<prompt>=&gt;</prompt> <userinput>SELECT a,
CASE a WHEN 1 THEN 'one'
WHEN 2 THEN 'two'
ELSE 'other'
END
FROM test;</userinput>
<computeroutput>
a | case
---+-------

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.18 2001/09/13 15:55:22 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/geqo.sgml,v 1.19 2001/10/09 18:46:00 petere Exp $
Genetic Optimizer
-->
@ -46,11 +46,11 @@ Genetic Optimizer
<para>
Among all relational operators the most difficult one to process and
optimize is the <firstterm>join</firstterm>. The number of alternative plans to answer a query
grows exponentially with the number of <command>join</command>s included in it. Further
grows exponentially with the number of joins included in it. Further
optimization effort is caused by the support of a variety of
<firstterm>join methods</firstterm>
(e.g., nested loop, hash join, merge join in <productname>Postgres</productname>) to
process individual <command>join</command>s and a diversity of
process individual joins and a diversity of
<firstterm>indexes</firstterm> (e.g., R-tree,
B-tree, hash in <productname>Postgres</productname>) as access paths for relations.
</para>
@ -69,7 +69,7 @@ Genetic Optimizer
Technology, in Freiberg, Germany, encountered the described problems as its
folks wanted to take the <productname>Postgres</productname> DBMS as the backend for a decision
support knowledge based system for the maintenance of an electrical
power grid. The DBMS needed to handle large <command>join</command> queries for the
power grid. The DBMS needed to handle large join queries for the
inference machine of the knowledge based system.
</para>
@ -85,10 +85,10 @@ Genetic Optimizer
</sect1>
<sect1 id="geqo-intro2">
<title>Genetic Algorithms (<acronym>GA</acronym>)</title>
<title>Genetic Algorithms</title>
<para>
The <acronym>GA</acronym> is a heuristic optimization method which
The genetic algorithm (<acronym>GA</acronym>) is a heuristic optimization method which
operates through
determined, randomized search. The set of possible solutions for the
optimization problem is considered as a
@ -118,14 +118,28 @@ Genetic Optimizer
strongly that a <acronym>GA</acronym> is not a pure random search for a solution to a
problem. A <acronym>GA</acronym> uses stochastic processes, but the result is distinctly
non-random (better than random).
</para>
<programlisting>
Structured Diagram of a <acronym>GA</acronym>:
---------------------------
<figure id="geqo-diagram">
<title>Structured Diagram of a Genetic Algorithm</title>
P(t) generation of ancestors at a time t
P''(t) generation of descendants at a time t
<informaltable frame="none">
<tgroup cols="2">
<tbody>
<row>
<entry>P(t)</entry>
<entry>generation of ancestors at a time t</entry>
</row>
<row>
<entry>P''(t)</entry>
<entry>generation of descendants at a time t</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<literallayout class="monospaced">
+=========================================+
|>>>>>>>>>>> Algorithm GA <<<<<<<<<<<<<<|
+=========================================+
@ -147,8 +161,8 @@ P''(t) generation of descendants at a time t
| +-------------------------------------+
| | t := t + 1 |
+===+=====================================+
</programlisting>
</para>
</literallayout>
</figure>
</sect1>
<sect1 id="geqo-pg-intro">
@ -158,14 +172,14 @@ P''(t) generation of descendants at a time t
The <acronym>GEQO</acronym> module is intended for the solution of the query
optimization problem similar to a traveling salesman problem (<acronym>TSP</acronym>).
Possible query plans are encoded as integer strings. Each string
represents the <command>join</command> order from one relation of the query to the next.
represents the join order from one relation of the query to the next.
E. g., the query tree
<programlisting>
<literallayout class="monospaced">
/\
/\ 2
/\ 3
4 1
</programlisting>
</literallayout>
is encoded by the integer string '4-1-3-2',
which means, first join relation '4' and '1', then '3', and
then '2', where 1, 2, 3, 4 are relids within the
@ -213,7 +227,7 @@ P''(t) generation of descendants at a time t
<para>
The <acronym>GEQO</acronym> module allows
the <productname>Postgres</productname> query optimizer to
support large <command>join</command> queries effectively through
support large join queries effectively through
non-exhaustive search.
</para>
@ -243,6 +257,7 @@ P''(t) generation of descendants at a time t
</para>
</sect2>
</sect1>
<bibliography id="geqo-biblio">
<title>
@ -326,7 +341,6 @@ P''(t) generation of descendants at a time t
</biblioentry>
</bibliography>
</sect1>
</chapter>
<!-- Keep this comment at the end of the file

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.59 2001/10/01 15:33:21 momjian Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.60 2001/10/09 18:46:00 petere Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@ -49,11 +49,11 @@ su - postgres
The following prerequisites exist for building <productname>PostgreSQL</>:
<itemizedlist>
<listitem>
<indexterm>
<primary>make</primary>
</indexterm>
<para>
<indexterm>
<primary>make</primary>
</indexterm>
<acronym>GNU</> <application>make</> is required; other
<application>make</> programs will <emphasis>not</> work.
<acronym>GNU</> <application>make</> is often installed under
@ -82,11 +82,11 @@ su - postgres
</listitem>
<listitem>
<indexterm>
<primary>readline</primary>
</indexterm>
<para>
<indexterm>
<primary>readline</primary>
</indexterm>
The <acronym>GNU</> <productname>Readline</> library for comfortable
line editing and command history retrieval will automatically be used
if found. You might wish to install it before proceeding, but it is not
@ -98,17 +98,17 @@ su - postgres
</listitem>
<listitem>
<indexterm>
<primary>flex</primary>
</indexterm>
<indexterm>
<primary>bison</primary>
</indexterm>
<indexterm>
<primary>yacc</primary>
</indexterm>
<para>
<indexterm>
<primary>flex</primary>
</indexterm>
<indexterm>
<primary>bison</primary>
</indexterm>
<indexterm>
<primary>yacc</primary>
</indexterm>
<application>Flex</> and <application>Bison</> are
<emphasis>not</> required when building from a released source
package because the output files are pre-generated. You will
@ -123,11 +123,12 @@ su - postgres
</listitem>
<listitem>
<indexterm>
<primary>installation</primary>
<secondary>on Windows</secondary>
</indexterm>
<para>
<indexterm>
<primary>installation</primary>
<secondary>on Windows</secondary>
</indexterm>
To build on <productname>Windows NT</> or <productname>Windows
2000</> you need the <productname>Cygwin</> and
<productname>cygipc</> packages. See the file
@ -208,11 +209,11 @@ su - postgres
</step>
<step>
<indexterm>
<primary>pg_dumpall</primary>
</indexterm>
<para>
<indexterm>
<primary>pg_dumpall</primary>
</indexterm>
To dump your database installation, type:
<screen>
<userinput>pg_dumpall &gt; <replaceable>outputfile</></userinput>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.15 2001/10/04 22:27:58 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.16 2001/10/09 18:46:00 petere Exp $
-->
<preface id="preface">
@ -49,7 +49,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.15 2001/10/04 22:27:58 peter
concepts in such a way that users can easily
extend the system:
<itemizedlist>
<itemizedlist spacing="compact">
<listitem>
<simpara>inheritance</>
</listitem>
@ -65,7 +65,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.15 2001/10/04 22:27:58 peter
<para>
Other features provide additional power and flexibility:
<itemizedlist>
<itemizedlist spacing="compact">
<listitem>
<simpara>constraints</simpara>
</listitem>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.22 2001/09/16 22:53:52 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/lobj.sgml,v 1.23 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="largeObjects">
@ -327,10 +327,6 @@ SELECT lo_export(image.raster, '/tmp/motd') from image
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* /usr/local/devel/pglite/cvs/src/doc/manual.me,v 1.16 1995/09/01 23:55:00 jolly Exp
*
*--------------------------------------------------------------
*/
#include &lt;stdio.h&gt;

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.15 2001/09/13 15:55:23 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.16 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="managing-databases">
@ -175,7 +175,10 @@ CREATE DATABASE <replaceable>name</> WITH LOCATION = '<replaceable>location</>'
risk. To allow it, you must compile <productname>Postgres</> with
the C preprocessor macro <literal>ALLOW_ABSOLUTE_DBPATHS</>
defined. One way to do this is to run the compilation step like
this: <userinput>gmake CPPFLAGS=-DALLOW_ABSOLUTE_DBPATHS all</>.
this:
<programlisting>
gmake CPPFLAGS=-DALLOW_ABSOLUTE_DBPATHS all
</programlisting>
</para>
</note>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.18 2001/09/13 15:55:23 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.19 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="mvcc">
@ -102,10 +102,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.18 2001/09/13 15:55:23 petere
<indexterm>
<primary>isolation levels</primary>
</indexterm>
The four isolation levels and the corresponding behaviors are described below.
The four transaction isolation levels and the corresponding
behaviors are described in <xref linkend="mvcc-isolevel-table">.
<table tocentry="1">
<title><acronym>ANSI</acronym>/<acronym>ISO</acronym> <acronym>SQL</acronym> Isolation Levels</title>
<table tocentry="1" id="mvcc-isolevel-table">
<title><acronym>SQL</acronym> Transaction Isolation Levels</title>
<titleabbrev>Isolation Levels</titleabbrev>
<tgroup cols="4">
<thead>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.16 2001/09/13 15:55:23 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.17 2001/10/09 18:46:00 petere Exp $
-->
<sect1 id="notation">
@ -21,7 +21,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.16 2001/09/13 15:55:23 pe
</para>
<para>
<filename>/usr/local/pgsql/</filename> is generally used as the root
We use <filename>/usr/local/pgsql/</filename> as the root
directory of the installation and <filename>/usr/local/pgsql/data</filename>
as the directory with the database files. These directories may vary
on your site, details can be derived in the <citetitle>Administrator's Guide</citetitle>.

View File

@ -22,91 +22,69 @@ refers to data that is stored in <productname>Postgres</productname> tables.
</para>
<para>
The following table shows how pages in both normal <productname>Postgres</productname> tables
<xref linkend="page-table"> shows how pages in both normal <productname>Postgres</productname> tables
and <productname>Postgres</productname> indexes
(e.g., a B-tree index) are structured.
</para>
<table tocentry="1">
<table tocentry="1" id="page-table">
<title>Sample Page Layout</title>
<titleabbrev>Page Layout</titleabbrev>
<tgroup cols="1">
<tgroup cols="2">
<thead>
<row>
<entry>
Item
</entry>
<entry>
Description
</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
itemPointerData
</entry>
<entry>itemPointerData</entry>
</row>
<row>
<entry>
filler
</entry>
<entry>filler</entry>
</row>
<row>
<entry>
itemData...
</entry>
<entry>itemData...</entry>
</row>
<row>
<entry>
Unallocated Space
</entry>
<entry>Unallocated Space</entry>
</row>
<row>
<entry>
ItemContinuationData
</entry>
<entry>ItemContinuationData</entry>
</row>
<row>
<entry>
Special Space
</entry>
<entry>Special Space</entry>
</row>
<row>
<entry>
``ItemData 2''
</entry>
<entry><quote>ItemData 2</quote></entry>
</row>
<row>
<entry>
``ItemData 1''
</entry>
<entry><quote>ItemData 1</quote></entry>
</row>
<row>
<entry>
ItemIdData
</entry>
<entry>ItemIdData</entry>
</row>
<row>
<entry>
PageHeaderData
</entry>
<entry>PageHeaderData</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<!--
.\" Running

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.10 2001/09/18 01:59:05 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.11 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="performance-tips">
@ -256,9 +256,10 @@ Hash Join (cost=181.22..564.83 rows=49 width=296)
along with the same estimated costs that a plain EXPLAIN shows.
For example, we might get a result like this:
<programlisting>
regression=# explain analyze select * from tenk1 t1, tenk2 t2 where t1.unique1 &lt; 50
regression-# and t1.unique2 = t2.unique2;
<screen>
regression=# explain analyze
regression-# select * from tenk1 t1, tenk2 t2
regression-# where t1.unique1 &lt; 50 and t1.unique2 = t2.unique2;
NOTICE: QUERY PLAN:
Nested Loop (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1)
@ -267,7 +268,7 @@ Nested Loop (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows
-&gt; Index Scan using tenk2_unique2 on tenk2 t2
(cost=0.00..3.01 rows=1 width=148) (actual time=0.28..0.31 rows=1 loops=50)
Total runtime: 30.67 msec
</programlisting>
</screen>
Note that the <quote>actual time</quote> values are in milliseconds of
real time, whereas the <quote>cost</quote> estimates are expressed in
@ -277,7 +278,7 @@ Total runtime: 30.67 msec
<para>
In some query plans, it is possible for a subplan node to be executed more
than once. For example, the inner indexscan is executed once per outer
than once. For example, the inner index scan is executed once per outer
tuple in the above nested-loop plan. In such cases, the
<quote>loops</quote> value reports the
total number of executions of the node, and the actual time and rows

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.9 2001/09/09 17:21:59 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/queries.sgml,v 1.10 2001/10/09 18:46:00 petere Exp $ -->
<chapter id="queries">
<title>Queries</title>
@ -535,7 +535,10 @@ FROM FDT WHERE
</para>
<synopsis>
SELECT <replaceable>select_list</replaceable> FROM ... <optional>WHERE ...</optional> GROUP BY <replaceable>grouping_column_reference</replaceable> <optional>, <replaceable>grouping_column_reference</replaceable></optional>...
SELECT <replaceable>select_list</replaceable>
FROM ...
<optional>WHERE ...</optional>
GROUP BY <replaceable>grouping_column_reference</replaceable> <optional>, <replaceable>grouping_column_reference</replaceable></optional>...
</synopsis>
<para>
@ -845,7 +848,9 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab
<para>
The ORDER BY clause specifies the sort order:
<synopsis>
SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> ORDER BY <replaceable>column1</replaceable> <optional>ASC | DESC</optional> <optional>, <replaceable>column2</replaceable> <optional>ASC | DESC</optional> ...</optional>
SELECT <replaceable>select_list</replaceable>
FROM <replaceable>table_expression</replaceable>
ORDER BY <replaceable>column1</replaceable> <optional>ASC | DESC</optional> <optional>, <replaceable>column2</replaceable> <optional>ASC | DESC</optional> ...</optional>
</synopsis>
<replaceable>column1</replaceable>, etc., refer to select list
columns. These can be either the output name of a column (see
@ -902,7 +907,10 @@ SELECT a AS b FROM table1 ORDER BY a;
</indexterm>
<synopsis>
SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression</replaceable> <optional>ORDER BY <replaceable>sort_spec</replaceable></optional> <optional>LIMIT { <replaceable>number</replaceable> | ALL }</optional> <optional>OFFSET <replaceable>number</replaceable></optional>
SELECT <replaceable>select_list</replaceable>
FROM <replaceable>table_expression</replaceable>
<optional>ORDER BY <replaceable>sort_spec</replaceable></optional>
<optional>LIMIT { <replaceable>number</replaceable> | ALL }</optional> <optional>OFFSET <replaceable>number</replaceable></optional>
</synopsis>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.18 2001/09/02 23:27:49 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/query.sgml,v 1.19 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="tutorial-sql">
@ -448,7 +448,8 @@ SELECT city, temp_lo, temp_hi, prcp, date, location
style to fully qualify column names in join queries:
<programlisting>
SELECT weather.city, weather.temp_lo, weather.temp_hi, weather.prcp, weather.date, cities.location
SELECT weather.city, weather.temp_lo, weather.temp_hi,
weather.prcp, weather.date, cities.location
FROM weather, cities
WHERE cities.name = weather.city;
</programlisting>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.27 2001/09/14 08:19:55 ishii Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_rule.sgml,v 1.28 2001/10/09 18:46:00 petere Exp $
Postgres documentation
-->
@ -225,29 +225,25 @@ CREATE
select command will cause <productname>Postgres</productname> to
report an error because the query cycled too many times:
<example>
<title>Example of a circular rewrite rule combination:</title>
<programlisting>
<programlisting>
CREATE RULE "_RETemp" AS
ON SELECT TO emp
DO INSTEAD
SELECT * FROM toyemp;
</programlisting>
<programlisting>
CREATE RULE "_RETtoyemp" AS
ON SELECT TO toyemp
DO INSTEAD
SELECT * FROM emp;
</programlisting>
<para>
</programlisting>
This attempt to select from EMP will cause
<productname>Postgres</productname> to issue an error
because the queries cycled too many times:
<programlisting>
<programlisting>
SELECT * FROM emp;
</programlisting></para>
</example>
</programlisting>
</para>
<para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.46 2001/09/13 15:55:24 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.47 2001/10/09 18:46:00 petere Exp $
Postgres documentation
-->
@ -2078,20 +2078,22 @@ affect a column or a table.
-->
<para>
table constraint definition:
<synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
<synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ]
CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
</synopsis>
</para>
<para>
column constraint definition:
<synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> )
<synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ]
CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ]
</synopsis>
</synopsis>
</para>
<!--
<para>

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.5 2001/09/03 12:57:50 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.6 2001/10/09 18:46:00 petere Exp $ -->
<refentry id="SQL-SET-TRANSACTION">
<docinfo>
<date>2000-11-24</date>
@ -17,7 +17,8 @@
<refsynopsisdiv>
<synopsis>
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE }
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL
{ READ COMMITTED | SERIALIZABLE }
</synopsis>
</refsynopsisdiv>
@ -79,8 +80,11 @@ SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SE
<para>
The session default transaction isolation level can also be set
with the command <literal>SET default_transaction_isolation =
'<replaceable>value</replaceable>'</literal> and in the
with the command
<programlisting>
SET default_transaction_isolation = '<replaceable>value</replaceable>'
</programlisting>
and in the
configuration file. Consult the <citetitle>Administrator's
Guide</citetitle> for more information.
</para>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.88 2001/10/01 22:44:31 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.89 2001/10/09 18:46:00 petere Exp $
-->
<Chapter Id="runtime">
@ -459,9 +459,9 @@ psql: could not connect to server: Connection refused
</para>
<para>
One way to set these options is to create a file
<filename>postgresql.conf</filename> in the data directory (e.g.,
<filename>/usr/local/pgsql/data</filename>). An example of what
One way to set these options is to edit the file
<filename>postgresql.conf</filename> in the data directory.
(A default file is installed there.) An example of what
this file could look like is:
<programlisting>
# This is a comment

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.3 2000/09/29 20:21:34 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.4 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="source">
@ -18,10 +18,14 @@ $Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.3 2000/09/29 20:21:34 pete
to your <filename>~/.emacs</filename>
initialization file:
<programlisting>
<programlisting>
;; check for files with a path containing "postgres" or "pgsql"
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\(postgres\\|pgsql\\).*\\.[ch]\\'" . pgsql-c-mode)
auto-mode-alist))
(setq auto-mode-alist
(cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode)
auto-mode-alist))
(defun pgsql-c-mode ()
;; sets up formatting for Postgres C code
@ -31,7 +35,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.3 2000/09/29 20:21:34 pete
(c-set-style "bsd") ; set c-basic-offset to 4, plus other stuff
(c-set-offset 'case-label '+) ; tweak case indent to match PG custom
(setq indent-tabs-mode t)) ; make sure we keep tabs when indenting
</programlisting>
</programlisting>
</para>
<para>
@ -39,25 +43,25 @@ $Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.3 2000/09/29 20:21:34 pete
<filename>~/.vimrc</filename> or equivalent file should contain
the following:
<programlisting>
<programlisting>
set tabstop=4
</programlisting>
</programlisting>
or equivalently from within vi, try
<programlisting>
<programlisting>
:set ts=4
</programlisting>
</programlisting>
</para>
<para>
The text browsing tools <application>more</application> and
<application>less</application> can be invoked as
<programlisting>
<programlisting>
more -x4
less -x4
</programlisting>
</programlisting>
</para>
</sect1>
</chapter>

View File

@ -173,21 +173,9 @@ XXX thomas 1997-12-24
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_connect</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
Initializes the SPI internal
structures for query execution and memory management.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
<!--
<REFSECT1 ID="R1-SPI-SPICONNECT-4">
@ -296,23 +284,11 @@ SPI_finish(void)
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_finish</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
Disconnects your procedure from the SPI manager and frees all memory
allocations made by your procedure via <Function>palloc</Function> since
the <Function>SPI_connect</Function>.
These allocations can't be used any more! See Memory management.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
<!--
<REFSECT1 ID="R1-SPI-SPIFINISH-4">
@ -526,22 +502,10 @@ You may pass many queries in one string or query string may be
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_exec</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
Disconnects your procedure from the SPI manager and frees all memory
allocations made by your procedure via <Function>palloc</Function> since the <Function>SPI_connect</Function>.
These allocations can't be used any more! See Memory management.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
<!--
<REFSECT1 ID="R1-SPI-SPIEXEC-4">
@ -710,20 +674,8 @@ The plan returned by <Function>SPI_prepare</Function> may be used only in curren
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_prepare</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
-->
<!--
@ -865,20 +817,8 @@ Execution plan location. NULL if unsuccessful.
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_saveplan</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
-->
<!--
@ -1074,20 +1014,8 @@ assumes that all values (if any) are NOT NULL.
<TITLE>Algorithm
</TITLE>
<PARA><FUNCTION>SPI_execp</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1>
-->
<!--

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/stylesheet.dsl,v 1.13 2001/10/04 22:30:14 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/stylesheet.dsl,v 1.14 2001/10/09 18:46:00 petere Exp $ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!-- must turn on one of these with -i on the jade command line -->
@ -36,8 +36,25 @@
(element lineannotation ($italic-seq$))
(element structfield ($mono-seq$))
(element structname ($mono-seq$))
(element symbol ($mono-seq$))
(element type ($mono-seq$))
;; The rules in the default stylesheet for productname format it as
;; a paragraph. This may be suitable for productname directly
;; within *info, but it's nonsense when productname is used
;; inline, as we do.
(mode set-titlepage-recto-mode
(element (para productname) ($charseq$)))
(mode set-titlepage-verso-mode
(element (para productname) ($charseq$)))
(mode book-titlepage-recto-mode
(element (para productname) ($charseq$)))
(mode book-titlepage-verso-mode
(element (para productname) ($charseq$)))
;; Add more here if needed...
<![ %output-html; [
;; customize the html stylesheet
@ -116,24 +133,16 @@
(define bop-footnotes #t)
(define %hyphenation%
(if tex-backend #t #f))
(define %refentry-new-page% #t)
(define %refentry-keep% #f)
(define %graphic-default-extension%
(cond (tex-backend "eps")
(rtf-backend "ai"))) ;; ApplixWare?
;; The rules in the default stylesheet for productname format it as
;; a paragraph. This may be suitable for productname directly
;; within *info, but it's nonsense when productname is used
;; inline, as we do.
(mode set-titlepage-recto-mode
(element (para productname) ($charseq$)))
(mode set-titlepage-verso-mode
(element (para productname) ($charseq$)))
(mode book-titlepage-recto-mode
(element (para productname) ($charseq$)))
(mode book-titlepage-verso-mode
(element (para productname) ($charseq$)))
;; Add more here if needed...
(define %footnote-ulinks%
(and tex-backend
(>= (string->number "1.73") 1.73)))
;; Format legalnotice justified and with space between paragraphs.
(mode book-titlepage-verso-mode
@ -147,6 +156,67 @@
space-after: (* 0.8 %para-sep%)
(process-children))))
;; Fix spacing bug in variablelists
(define (process-listitem-content)
(if (absolute-first-sibling?)
(make sequence
(process-children-trim))
(next-match)))
;; Default stylesheets format simplelists are tables. This just
;; spells trouble for Jade.
(define %simplelist-indent% 1em)
(define (my-simplelist-vert members)
(make display-group
space-before: %para-sep%
space-after: %para-sep%
start-indent: (+ %simplelist-indent% (inherited-start-indent))
(process-children)))
(element simplelist
(let ((type (attribute-string (normalize "type")))
(cols (if (attribute-string (normalize "columns"))
(if (> (string->number (attribute-string (normalize "columns"))) 0)
(string->number (attribute-string (normalize "columns")))
1)
1))
(members (select-elements (children (current-node)) (normalize "member"))))
(cond
((equal? type (normalize "inline"))
(if (equal? (gi (parent (current-node)))
(normalize "para"))
(process-children)
(make paragraph
space-before: %para-sep%
space-after: %para-sep%
start-indent: (inherited-start-indent))))
((equal? type (normalize "vert"))
(my-simplelist-vert members))
((equal? type (normalize "horiz"))
(simplelist-table 'row cols members)))))
(element member
(let ((type (inherited-attribute-string (normalize "type"))))
(cond
((equal? type (normalize "inline"))
(make sequence
(process-children)
(if (not (last-sibling?))
(literal ", ")
(literal ""))))
((equal? type (normalize "vert"))
(make paragraph
space-before: 0pt
space-after: 0pt))
((equal? type (normalize "horiz"))
(make paragraph
quadding: 'start
(process-children))))))
]]> <!-- %output-print -->
<![ %output-text; [

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.47 2001/09/13 15:55:23 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.48 2001/10/09 18:46:00 petere Exp $
-->
<chapter id="sql-syntax">
@ -12,7 +12,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.47 2001/09/13 15:55:23 pete
<abstract>
<para>
A description of the general syntax of SQL.
This chapter describes the syntax of SQL.
</para>
</abstract>
@ -179,8 +179,8 @@ UPDATE "my_table" SET "a" = 5;
each other.
<footnote>
<para>
<productname>Postgres</productname>' folding of unquoted names to lower
case is incompatible with the SQL standard, which says that unquoted
The folding of unquoted names to lower case in <productname>PostgreSQL</>
is incompatible with the SQL standard, which says that unquoted
names should be folded to upper case. Thus, <literal>foo</literal>
should be equivalent to <literal>"FOO"</literal> not
<literal>"foo"</literal> according to the standard. If you want to
@ -815,8 +815,8 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
</listitem>
<listitem>
<para>
<synopsis>( <replaceable>expression</replaceable> )</synopsis>
<para>
Parentheses are used to group subexpressions and override precedence.
</para>
</listitem>
@ -1039,7 +1039,7 @@ SELECT (5 !) - 6;
<table tocentry="1">
<title>Operator Precedence (decreasing)</title>
<tgroup cols="2">
<tgroup cols="3">
<thead>
<row>
<entry>Operator/Element</entry>