Commit ffb8f738 authored by Peter Eisentraut's avatar Peter Eisentraut

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

output (from pdfjadetex).  Also updated instructions to install documentation
processing toolchain.
parent 2f1c24cb
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # 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 ...@@ -123,6 +123,9 @@ $(addsuffix .tex, $(ALLBOOKS)): %.tex: %.sgml $(ALLSGML) stylesheet.dsl
# TeX transforms '--' into en-dashes. This hack should go away when # TeX transforms '--' into en-dashes. This hack should go away when
# OpenJade is fixed (ver. 1.4?) # 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' $@
$(PERL) -pi -e "s/\'\'/\\\\mbox{}'\\\\mbox{}'\\\\mbox{}/g" $@
%.dvi: %.tex %.dvi: %.tex
jadetex $< jadetex $<
......
<!-- $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"> <chapter id="charset">
<title>Localization</> <title>Localization</>
...@@ -293,7 +293,7 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -293,7 +293,7 @@ perl: warning: Falling back to the standard locale ("C").
values in the following table: values in the following table:
<table tocentry="1"> <table tocentry="1">
<title><productname>Postgres</productname> Character Set Encodings</title> <title>Character Set Encodings</title>
<titleabbrev>Encodings</titleabbrev> <titleabbrev>Encodings</titleabbrev>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
...@@ -451,7 +451,7 @@ $ psql -l ...@@ -451,7 +451,7 @@ $ psql -l
and frontend for some encodings. and frontend for some encodings.
<table tocentry="1"> <table tocentry="1">
<title><productname>Postgres</productname> Client/Server Character Set Encodings</title> <title>Client/Server Character Set Encodings</title>
<titleabbrev>Communication Encodings</titleabbrev> <titleabbrev>Communication Encodings</titleabbrev>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
...@@ -618,38 +618,47 @@ RESET CLIENT_ENCODING; ...@@ -618,38 +618,47 @@ RESET CLIENT_ENCODING;
These are good sources to start learning about various kinds of encoding These are good sources to start learning about various kinds of encoding
systems. systems.
<itemizedlist> <variablelist>
<listitem> <varlistentry>
<para> <term><ulink url="ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf"
<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>
>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> <listitem>
appear in section 3.2. <para>
</para> Detailed explanations of <literal>EUC_JP</literal>,
</listitem> <literal>EUC_CN</literal>, <literal>EUC_KR</literal>,
<literal>EUC_TW</literal> appear in section 3.2.
<listitem> </para>
<para> </listitem>
Unicode: <ulink url="http://www.unicode.org/">http://www.unicode.org/</ulink> </varlistentry>
The homepage of Unicode.
</para> <varlistentry>
</listitem> <term><ulink url="http://www.unicode.org/">http://www.unicode.org/</ulink></term>
<listitem> <listitem>
<para> <para>
<literal>RFC 2044</literal> The web site of the Unicode Consortium
<literal>UTF</literal>-8 is defined here. </para>
</para> </listitem>
</listitem> </varlistentry>
</itemizedlist>
<varlistentry>
<term>RFC 2044</term>
<listitem>
<para>
<acronym>UTF</acronym>-8 is defined here.
</para>
</listitem>
</varlistentry>
</variablelist>
</para> </para>
</sect2> </sect2>
<sect2> <sect2>
<title>History</title> <title>History</title>
<para> <literallayout class="monospaced">
<programlisting>
Dec 7, 2000 Dec 7, 2000
* An automatic encoding translation between Unicode and other * An automatic encoding translation between Unicode and other
encodings are implemented encodings are implemented
...@@ -728,8 +737,7 @@ Mar 10, 1998 PL2 released ...@@ -728,8 +737,7 @@ Mar 10, 1998 PL2 released
* fix problems concerning 8-bit single byte characters * fix problems concerning 8-bit single byte characters
Mar 1, 1998 PL1 released Mar 1, 1998 PL1 released
</programlisting> </literallayout>
</para>
</sect2> </sect2>
<sect2> <sect2>
......
<!-- <!--
$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 CVS code repository
Thomas Lockhart Thomas Lockhart
--> -->
<appendix label="DG1" id="cvs"> <appendix id="cvs">
<docinfo> <docinfo>
<authorgroup> <authorgroup>
<author> <author>
......
<!-- <!--
$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"> <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 ...@@ -168,8 +168,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.65 2001/10/03 05:24:22 th
</row> </row>
<row> <row>
<entry><type>numeric(<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><type>decimal(<replaceable>p</replaceable>, <replaceable>s</replaceable>)</type></entry>
<entry>exact numeric with selectable precision</entry> <entry>exact numeric with selectable precision</entry>
</row> </row>
...@@ -648,30 +648,33 @@ NUMERIC ...@@ -648,30 +648,33 @@ NUMERIC
In the current implementation, specifying In the current implementation, specifying
<programlisting> <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> </programlisting>
is equivalent to specifying: is equivalent to specifying:
<programlisting> <programlisting>
CREATE SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq; CREATE SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq;
CREATE TABLE <replaceable class="parameter">tablename</replaceable> 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); <replaceable class="parameter">colname</replaceable> integer DEFAULT nextval('<replaceable class="parameter">tablename</replaceable>_<replaceable class="parameter">colname</replaceable>_seq') UNIQUE NOT NULL
);
</programlisting> </programlisting>
Thus, we have created an integer column and arranged for its default Thus, we have created an integer column and arranged for its default
values to be assigned from a sequence generator. UNIQUE and NOT NULL values to be assigned from a sequence generator. UNIQUE and NOT NULL
constraints are applied to ensure that explicitly-inserted values constraints are applied to ensure that explicitly-inserted values
will never be duplicates, either. will never be duplicates, either.
</para>
<caution> <important>
<para> <para>
The implicit sequence created for the <type>serial</type> type will The implicit sequence created for the <type>serial</type> type will
<emphasis>not</emphasis> be automatically removed when the <emphasis>not</emphasis> be automatically removed when the
table is dropped. table is dropped.
</para> </para>
</caution> </important>
</para>
<para> <para>
The type names <type>serial</type> and <type>serial4</type> are The type names <type>serial</type> and <type>serial4</type> are
...@@ -974,7 +977,7 @@ SELECT b, char_length(b) FROM test2; ...@@ -974,7 +977,7 @@ SELECT b, char_length(b) FROM test2;
<para> <para>
<table tocentry="1"> <table tocentry="1">
<title>Date/Time Types</title> <title>Date/Time Types</title>
<tgroup cols="4"> <tgroup cols="6">
<thead> <thead>
<row> <row>
<entry>Type</entry> <entry>Type</entry>
...@@ -2563,18 +2566,25 @@ SELECT * FROM test1 WHERE a; ...@@ -2563,18 +2566,25 @@ SELECT * FROM test1 WHERE a;
The <type>macaddr</> type stores MAC addresses, i.e., Ethernet The <type>macaddr</> type stores MAC addresses, i.e., Ethernet
card hardware addresses (although MAC addresses are used for card hardware addresses (although MAC addresses are used for
other purposes as well). Input is accepted in various customary other purposes as well). Input is accepted in various customary
formats, including <literal>'08002b:010203'</>, formats, including
<literal>'08002b-010203'</>, <literal>'0800.2b01.0203'</>,
<literal>'08-00-2b-01-02-03'</>, and <simplelist>
<literal>'08:00:2b:01:02:03'</>, which would all specify the same <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 address. Upper and lower case is accepted for the digits
<literal>a</> through <literal>f</>. Output is always in the <literal>a</> through <literal>f</>. Output is always in the
latter of the given forms. last of the shown forms.
</para> </para>
<para> <para>
The directory <filename class="directory">contrib/mac</filename> 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 contains tools that can be used to map MAC addresses to hardware
manufacturer names. manufacturer names.
</para> </para>
......
<!-- $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 --> <!-- PostgreSQL Developer's Guide -->
<book id="developer"> <book id="developer">
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
&legal; &legal;
<abstract> <abstract>
<simpara> <para>
This document contains assorted information that can be of use to This document contains assorted information that can be of use to
<productname>PostgreSQL</> developers. <productname>PostgreSQL</> developers.
</simpara> </para>
</abstract> </abstract>
</bookinfo> </bookinfo>
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
&page; &page;
&geqo; &geqo;
&nls; &nls;
<![%single-book;[
&biblio;
]]>
<!-- appendices --> <!-- appendices -->
&cvs; &cvs;
&docguide; &docguide;
<![%single-book;[
&biblio;
]]>
</book> </book>
This diff is collapsed.
<!-- $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"> <chapter id="functions">
<title>Functions and Operators</title> <title>Functions and Operators</title>
...@@ -1549,7 +1549,7 @@ ...@@ -1549,7 +1549,7 @@
<sect1 id="functions-formatting"> <sect1 id="functions-formatting">
<title>Multi-type Formatting Functions</title> <title>Data Type Formatting Functions</title>
<indexterm zone="functions-formatting"> <indexterm zone="functions-formatting">
<primary>formatting</primary> <primary>formatting</primary>
...@@ -2280,7 +2280,7 @@ ...@@ -2280,7 +2280,7 @@
<table id="operators-datetime-table"> <table id="operators-datetime-table">
<title>Date/Time Operators</title> <title>Date/Time Operators</title>
<tgroup cols="4"> <tgroup cols="3">
<thead> <thead>
<row> <row>
<entry>Name</entry> <entry>Name</entry>
...@@ -2354,7 +2354,7 @@ ...@@ -2354,7 +2354,7 @@
<table id="functions-datetime-table"> <table id="functions-datetime-table">
<title>Date/Time Functions</title> <title>Date/Time Functions</title>
<tgroup cols="4"> <tgroup cols="5">
<thead> <thead>
<row> <row>
<entry>Name</entry> <entry>Name</entry>
...@@ -3657,7 +3657,12 @@ END ...@@ -3657,7 +3657,12 @@ END
3 3
</computeroutput> </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> <computeroutput>
a | case a | case
---+------- ---+-------
...@@ -3699,7 +3704,12 @@ END ...@@ -3699,7 +3704,12 @@ END
The example above can be written using the simple The example above can be written using the simple
<token>CASE</token> syntax: <token>CASE</token> syntax:
<screen> <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> <computeroutput>
a | case a | case
---+------- ---+-------
......
<!-- <!--
$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 Genetic Optimizer
--> -->
...@@ -46,11 +46,11 @@ Genetic Optimizer ...@@ -46,11 +46,11 @@ Genetic Optimizer
<para> <para>
Among all relational operators the most difficult one to process and 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 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 optimization effort is caused by the support of a variety of
<firstterm>join methods</firstterm> <firstterm>join methods</firstterm>
(e.g., nested loop, hash join, merge join in <productname>Postgres</productname>) to (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, <firstterm>indexes</firstterm> (e.g., R-tree,
B-tree, hash in <productname>Postgres</productname>) as access paths for relations. B-tree, hash in <productname>Postgres</productname>) as access paths for relations.
</para> </para>
...@@ -69,7 +69,7 @@ Genetic Optimizer ...@@ -69,7 +69,7 @@ Genetic Optimizer
Technology, in Freiberg, Germany, encountered the described problems as its 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 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 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. inference machine of the knowledge based system.
</para> </para>
...@@ -85,10 +85,10 @@ Genetic Optimizer ...@@ -85,10 +85,10 @@ Genetic Optimizer
</sect1> </sect1>
<sect1 id="geqo-intro2"> <sect1 id="geqo-intro2">
<title>Genetic Algorithms (<acronym>GA</acronym>)</title> <title>Genetic Algorithms</title>
<para> <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 operates through
determined, randomized search. The set of possible solutions for the determined, randomized search. The set of possible solutions for the
optimization problem is considered as a optimization problem is considered as a
...@@ -118,14 +118,28 @@ Genetic Optimizer ...@@ -118,14 +118,28 @@ Genetic Optimizer
strongly that a <acronym>GA</acronym> is not a pure random search for a solution to a 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 problem. A <acronym>GA</acronym> uses stochastic processes, but the result is distinctly
non-random (better than random). non-random (better than random).
</para>
<programlisting> <figure id="geqo-diagram">
Structured Diagram of a <acronym>GA</acronym>: <title>Structured Diagram of a Genetic Algorithm</title>
---------------------------
<informaltable frame="none">
P(t) generation of ancestors at a time t <tgroup cols="2">
P''(t) generation of descendants at a time t <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 <<<<<<<<<<<<<<| |>>>>>>>>>>> Algorithm GA <<<<<<<<<<<<<<|
+=========================================+ +=========================================+
...@@ -147,8 +161,8 @@ P''(t) generation of descendants at a time t ...@@ -147,8 +161,8 @@ P''(t) generation of descendants at a time t
| +-------------------------------------+ | +-------------------------------------+
| | t := t + 1 | | | t := t + 1 |
+===+=====================================+ +===+=====================================+
</programlisting> </literallayout>
</para> </figure>
</sect1> </sect1>
<sect1 id="geqo-pg-intro"> <sect1 id="geqo-pg-intro">
...@@ -158,14 +172,14 @@ P''(t) generation of descendants at a time t ...@@ -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 The <acronym>GEQO</acronym> module is intended for the solution of the query
optimization problem similar to a traveling salesman problem (<acronym>TSP</acronym>). optimization problem similar to a traveling salesman problem (<acronym>TSP</acronym>).
Possible query plans are encoded as integer strings. Each string 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 E. g., the query tree
<programlisting> <literallayout class="monospaced">
/\ /\
/\ 2 /\ 2
/\ 3 /\ 3
4 1 4 1
</programlisting> </literallayout>
is encoded by the integer string '4-1-3-2', is encoded by the integer string '4-1-3-2',
which means, first join relation '4' and '1', then '3', and which means, first join relation '4' and '1', then '3', and
then '2', where 1, 2, 3, 4 are relids within the then '2', where 1, 2, 3, 4 are relids within the
...@@ -213,7 +227,7 @@ P''(t) generation of descendants at a time t ...@@ -213,7 +227,7 @@ P''(t) generation of descendants at a time t
<para> <para>
The <acronym>GEQO</acronym> module allows The <acronym>GEQO</acronym> module allows
the <productname>Postgres</productname> query optimizer to the <productname>Postgres</productname> query optimizer to
support large <command>join</command> queries effectively through support large join queries effectively through
non-exhaustive search. non-exhaustive search.
</para> </para>
...@@ -243,6 +257,7 @@ P''(t) generation of descendants at a time t ...@@ -243,6 +257,7 @@ P''(t) generation of descendants at a time t
</para> </para>
</sect2> </sect2>
</sect1>
<bibliography id="geqo-biblio"> <bibliography id="geqo-biblio">
<title> <title>
...@@ -326,7 +341,6 @@ P''(t) generation of descendants at a time t ...@@ -326,7 +341,6 @@ P''(t) generation of descendants at a time t
</biblioentry> </biblioentry>
</bibliography> </bibliography>
</sect1>
</chapter> </chapter>
<!-- Keep this comment at the end of the file <!-- Keep this comment at the end of the file
......
<!-- $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"> <chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]> <title><![%standalone-include[<productname>PostgreSQL</>]]>
...@@ -49,11 +49,11 @@ su - postgres ...@@ -49,11 +49,11 @@ su - postgres
The following prerequisites exist for building <productname>PostgreSQL</>: The following prerequisites exist for building <productname>PostgreSQL</>:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<indexterm>
<primary>make</primary>
</indexterm>
<para> <para>
<indexterm>
<primary>make</primary>
</indexterm>
<acronym>GNU</> <application>make</> is required; other <acronym>GNU</> <application>make</> is required; other
<application>make</> programs will <emphasis>not</> work. <application>make</> programs will <emphasis>not</> work.
<acronym>GNU</> <application>make</> is often installed under <acronym>GNU</> <application>make</> is often installed under
...@@ -82,11 +82,11 @@ su - postgres ...@@ -82,11 +82,11 @@ su - postgres
</listitem> </listitem>
<listitem> <listitem>
<indexterm>
<primary>readline</primary>
</indexterm>
<para> <para>
<indexterm>
<primary>readline</primary>
</indexterm>
The <acronym>GNU</> <productname>Readline</> library for comfortable The <acronym>GNU</> <productname>Readline</> library for comfortable
line editing and command history retrieval will automatically be used line editing and command history retrieval will automatically be used
if found. You might wish to install it before proceeding, but it is not if found. You might wish to install it before proceeding, but it is not
...@@ -98,17 +98,17 @@ su - postgres ...@@ -98,17 +98,17 @@ su - postgres
</listitem> </listitem>
<listitem> <listitem>
<indexterm>
<primary>flex</primary>
</indexterm>
<indexterm>
<primary>bison</primary>
</indexterm>
<indexterm>
<primary>yacc</primary>
</indexterm>
<para> <para>
<indexterm>
<primary>flex</primary>
</indexterm>
<indexterm>
<primary>bison</primary>
</indexterm>
<indexterm>
<primary>yacc</primary>
</indexterm>
<application>Flex</> and <application>Bison</> are <application>Flex</> and <application>Bison</> are
<emphasis>not</> required when building from a released source <emphasis>not</> required when building from a released source
package because the output files are pre-generated. You will package because the output files are pre-generated. You will
...@@ -123,11 +123,12 @@ su - postgres ...@@ -123,11 +123,12 @@ su - postgres
</listitem> </listitem>
<listitem> <listitem>
<indexterm>
<primary>installation</primary>
<secondary>on Windows</secondary>
</indexterm>
<para> <para>
<indexterm>
<primary>installation</primary>
<secondary>on Windows</secondary>
</indexterm>
To build on <productname>Windows NT</> or <productname>Windows To build on <productname>Windows NT</> or <productname>Windows
2000</> you need the <productname>Cygwin</> and 2000</> you need the <productname>Cygwin</> and
<productname>cygipc</> packages. See the file <productname>cygipc</> packages. See the file
...@@ -208,11 +209,11 @@ su - postgres ...@@ -208,11 +209,11 @@ su - postgres
</step> </step>
<step> <step>
<indexterm>
<primary>pg_dumpall</primary>
</indexterm>
<para> <para>
<indexterm>
<primary>pg_dumpall</primary>
</indexterm>
To dump your database installation, type: To dump your database installation, type:
<screen> <screen>
<userinput>pg_dumpall &gt; <replaceable>outputfile</></userinput> <userinput>pg_dumpall &gt; <replaceable>outputfile</></userinput>
......
<!-- <!--
$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"> <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 ...@@ -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 concepts in such a way that users can easily
extend the system: extend the system:
<itemizedlist> <itemizedlist spacing="compact">
<listitem> <listitem>
<simpara>inheritance</> <simpara>inheritance</>
</listitem> </listitem>
...@@ -65,7 +65,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.15 2001/10/04 22:27:58 peter ...@@ -65,7 +65,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/intro.sgml,v 1.15 2001/10/04 22:27:58 peter
<para> <para>
Other features provide additional power and flexibility: Other features provide additional power and flexibility:
<itemizedlist> <itemizedlist spacing="compact">
<listitem> <listitem>
<simpara>constraints</simpara> <simpara>constraints</simpara>
</listitem> </listitem>
......
<!-- <!--
$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"> <chapter id="largeObjects">
...@@ -327,10 +327,6 @@ SELECT lo_export(image.raster, '/tmp/motd') from image ...@@ -327,10 +327,6 @@ SELECT lo_export(image.raster, '/tmp/motd') from image
* *
* Copyright (c) 1994, Regents of the University of California * 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; #include &lt;stdio.h&gt;
......
<!-- <!--
$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"> <chapter id="managing-databases">
...@@ -175,7 +175,10 @@ CREATE DATABASE <replaceable>name</> WITH LOCATION = '<replaceable>location</>' ...@@ -175,7 +175,10 @@ CREATE DATABASE <replaceable>name</> WITH LOCATION = '<replaceable>location</>'
risk. To allow it, you must compile <productname>Postgres</> with risk. To allow it, you must compile <productname>Postgres</> with
the C preprocessor macro <literal>ALLOW_ABSOLUTE_DBPATHS</> the C preprocessor macro <literal>ALLOW_ABSOLUTE_DBPATHS</>
defined. One way to do this is to run the compilation step like 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> </para>
</note> </note>
......
<!-- <!--
$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"> <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 ...@@ -102,10 +102,11 @@ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.18 2001/09/13 15:55:23 petere
<indexterm> <indexterm>
<primary>isolation levels</primary> <primary>isolation levels</primary>
</indexterm> </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"> <table tocentry="1" id="mvcc-isolevel-table">
<title><acronym>ANSI</acronym>/<acronym>ISO</acronym> <acronym>SQL</acronym> Isolation Levels</title> <title><acronym>SQL</acronym> Transaction Isolation Levels</title>
<titleabbrev>Isolation Levels</titleabbrev> <titleabbrev>Isolation Levels</titleabbrev>
<tgroup cols="4"> <tgroup cols="4">
<thead> <thead>
......
<!-- <!--
$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"> <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 ...@@ -21,7 +21,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/notation.sgml,v 1.16 2001/09/13 15:55:23 pe
</para> </para>
<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> directory of the installation and <filename>/usr/local/pgsql/data</filename>
as the directory with the database files. These directories may vary 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>. on your site, details can be derived in the <citetitle>Administrator's Guide</citetitle>.
......
...@@ -22,91 +22,69 @@ refers to data that is stored in <productname>Postgres</productname> tables. ...@@ -22,91 +22,69 @@ refers to data that is stored in <productname>Postgres</productname> tables.
</para> </para>
<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 and <productname>Postgres</productname> indexes
(e.g., a B-tree index) are structured. (e.g., a B-tree index) are structured.
</para>
<table tocentry="1"> <table tocentry="1" id="page-table">
<title>Sample Page Layout</title> <title>Sample Page Layout</title>
<titleabbrev>Page Layout</titleabbrev> <titleabbrev>Page Layout</titleabbrev>
<tgroup cols="1"> <tgroup cols="2">
<thead> <thead>
<row> <row>
<entry> <entry>
Item Item
</entry> </entry>
<entry> <entry>Description</entry>
Description
</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry> <entry>itemPointerData</entry>
itemPointerData
</entry>
</row> </row>
<row> <row>
<entry> <entry>filler</entry>
filler
</entry>
</row> </row>
<row> <row>
<entry> <entry>itemData...</entry>
itemData...
</entry>
</row> </row>
<row> <row>
<entry> <entry>Unallocated Space</entry>
Unallocated Space
</entry>
</row> </row>
<row> <row>
<entry> <entry>ItemContinuationData</entry>
ItemContinuationData
</entry>
</row> </row>
<row> <row>
<entry> <entry>Special Space</entry>
Special Space
</entry>
</row> </row>
<row> <row>
<entry> <entry><quote>ItemData 2</quote></entry>
``ItemData 2''
</entry>
</row> </row>
<row> <row>
<entry> <entry><quote>ItemData 1</quote></entry>
``ItemData 1''
</entry>
</row> </row>
<row> <row>
<entry> <entry>ItemIdData</entry>
ItemIdData
</entry>
</row> </row>
<row> <row>
<entry> <entry>PageHeaderData</entry>
PageHeaderData
</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
</para>
<!-- <!--
.\" Running .\" Running
......
<!-- <!--
$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"> <chapter id="performance-tips">
...@@ -256,9 +256,10 @@ Hash Join (cost=181.22..564.83 rows=49 width=296) ...@@ -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. along with the same estimated costs that a plain EXPLAIN shows.
For example, we might get a result like this: For example, we might get a result like this:
<programlisting> <screen>
regression=# explain analyze select * from tenk1 t1, tenk2 t2 where t1.unique1 &lt; 50 regression=# explain analyze
regression-# and t1.unique2 = t2.unique2; regression-# select * from tenk1 t1, tenk2 t2
regression-# where t1.unique1 &lt; 50 and t1.unique2 = t2.unique2;
NOTICE: QUERY PLAN: NOTICE: QUERY PLAN:
Nested Loop (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1) 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 ...@@ -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 -&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) (cost=0.00..3.01 rows=1 width=148) (actual time=0.28..0.31 rows=1 loops=50)
Total runtime: 30.67 msec Total runtime: 30.67 msec
</programlisting> </screen>
Note that the <quote>actual time</quote> values are in milliseconds of Note that the <quote>actual time</quote> values are in milliseconds of
real time, whereas the <quote>cost</quote> estimates are expressed in real time, whereas the <quote>cost</quote> estimates are expressed in
...@@ -277,7 +278,7 @@ Total runtime: 30.67 msec ...@@ -277,7 +278,7 @@ Total runtime: 30.67 msec
<para> <para>
In some query plans, it is possible for a subplan node to be executed more 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 tuple in the above nested-loop plan. In such cases, the
<quote>loops</quote> value reports the <quote>loops</quote> value reports the
total number of executions of the node, and the actual time and rows total number of executions of the node, and the actual time and rows
......
<!-- $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"> <chapter id="queries">
<title>Queries</title> <title>Queries</title>
...@@ -535,7 +535,10 @@ FROM FDT WHERE ...@@ -535,7 +535,10 @@ FROM FDT WHERE
</para> </para>
<synopsis> <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> </synopsis>
<para> <para>
...@@ -845,7 +848,9 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab ...@@ -845,7 +848,9 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab
<para> <para>
The ORDER BY clause specifies the sort order: The ORDER BY clause specifies the sort order:
<synopsis> <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> </synopsis>
<replaceable>column1</replaceable>, etc., refer to select list <replaceable>column1</replaceable>, etc., refer to select list
columns. These can be either the output name of a column (see 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; ...@@ -902,7 +907,10 @@ SELECT a AS b FROM table1 ORDER BY a;
</indexterm> </indexterm>
<synopsis> <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> </synopsis>
<para> <para>
......
<!-- <!--
$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"> <chapter id="tutorial-sql">
...@@ -448,7 +448,8 @@ SELECT city, temp_lo, temp_hi, prcp, date, location ...@@ -448,7 +448,8 @@ SELECT city, temp_lo, temp_hi, prcp, date, location
style to fully qualify column names in join queries: style to fully qualify column names in join queries:
<programlisting> <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 FROM weather, cities
WHERE cities.name = weather.city; WHERE cities.name = weather.city;
</programlisting> </programlisting>
......
<!-- <!--
$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 Postgres documentation
--> -->
...@@ -225,29 +225,25 @@ CREATE ...@@ -225,29 +225,25 @@ CREATE
select command will cause <productname>Postgres</productname> to select command will cause <productname>Postgres</productname> to
report an error because the query cycled too many times: report an error because the query cycled too many times:
<example> <programlisting>
<title>Example of a circular rewrite rule combination:</title>
<programlisting>
CREATE RULE "_RETemp" AS CREATE RULE "_RETemp" AS
ON SELECT TO emp ON SELECT TO emp
DO INSTEAD DO INSTEAD
SELECT * FROM toyemp; SELECT * FROM toyemp;
</programlisting>
<programlisting>
CREATE RULE "_RETtoyemp" AS CREATE RULE "_RETtoyemp" AS
ON SELECT TO toyemp ON SELECT TO toyemp
DO INSTEAD DO INSTEAD
SELECT * FROM emp; SELECT * FROM emp;
</programlisting> </programlisting>
<para>
This attempt to select from EMP will cause This attempt to select from EMP will cause
<productname>Postgres</productname> to issue an error <productname>Postgres</productname> to issue an error
because the queries cycled too many times: because the queries cycled too many times:
<programlisting>
<programlisting>
SELECT * FROM emp; SELECT * FROM emp;
</programlisting></para> </programlisting>
</example>
</para> </para>
<para> <para>
......
<!-- <!--
$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 Postgres documentation
--> -->
...@@ -2078,20 +2078,22 @@ affect a column or a table. ...@@ -2078,20 +2078,22 @@ affect a column or a table.
--> -->
<para> <para>
table constraint definition: table constraint definition:
<synopsis> <synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> ) [ CONSTRAINT <replaceable>constraint_name</replaceable> ]
CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ] [ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
</synopsis> </synopsis>
</para> </para>
<para> <para>
column constraint definition: column constraint definition:
<synopsis> <synopsis>
[ CONSTRAINT <replaceable>constraint_name</replaceable> ] CHECK ( VALUE <replaceable>condition</replaceable> ) [ CONSTRAINT <replaceable>constraint_name</replaceable> ]
CHECK ( VALUE <replaceable>condition</replaceable> )
[ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ] [ {INITIALLY DEFERRED | INITIALLY IMMEDIATE} ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
</synopsis> </synopsis>
</para> </para>
<!-- <!--
<para> <para>
......
<!-- $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"> <refentry id="SQL-SET-TRANSACTION">
<docinfo> <docinfo>
<date>2000-11-24</date> <date>2000-11-24</date>
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
<refsynopsisdiv> <refsynopsisdiv>
<synopsis> <synopsis>
SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } 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> </synopsis>
</refsynopsisdiv> </refsynopsisdiv>
...@@ -79,8 +80,11 @@ SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SE ...@@ -79,8 +80,11 @@ SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL { READ COMMITTED | SE
<para> <para>
The session default transaction isolation level can also be set The session default transaction isolation level can also be set
with the command <literal>SET default_transaction_isolation = with the command
'<replaceable>value</replaceable>'</literal> and in the <programlisting>
SET default_transaction_isolation = '<replaceable>value</replaceable>'
</programlisting>
and in the
configuration file. Consult the <citetitle>Administrator's configuration file. Consult the <citetitle>Administrator's
Guide</citetitle> for more information. Guide</citetitle> for more information.
</para> </para>
......
<!-- <!--
$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"> <Chapter Id="runtime">
...@@ -459,9 +459,9 @@ psql: could not connect to server: Connection refused ...@@ -459,9 +459,9 @@ psql: could not connect to server: Connection refused
</para> </para>
<para> <para>
One way to set these options is to create a file One way to set these options is to edit the file
<filename>postgresql.conf</filename> in the data directory (e.g., <filename>postgresql.conf</filename> in the data directory.
<filename>/usr/local/pgsql/data</filename>). An example of what (A default file is installed there.) An example of what
this file could look like is: this file could look like is:
<programlisting> <programlisting>
# This is a comment # This is a comment
......
<!-- <!--
$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"> <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 ...@@ -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> to your <filename>~/.emacs</filename>
initialization file: initialization file:
<programlisting> <programlisting>
;; check for files with a path containing "postgres" or "pgsql" ;; 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
(setq auto-mode-alist (cons '("\\(postgres\\|pgsql\\).*\\.cc\\'" . pgsql-c-mode) 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 () (defun pgsql-c-mode ()
;; sets up formatting for Postgres C code ;; 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 ...@@ -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-style "bsd") ; set c-basic-offset to 4, plus other stuff
(c-set-offset 'case-label '+) ; tweak case indent to match PG custom (c-set-offset 'case-label '+) ; tweak case indent to match PG custom
(setq indent-tabs-mode t)) ; make sure we keep tabs when indenting (setq indent-tabs-mode t)) ; make sure we keep tabs when indenting
</programlisting> </programlisting>
</para> </para>
<para> <para>
...@@ -39,25 +43,25 @@ $Header: /cvsroot/pgsql/doc/src/sgml/sources.sgml,v 2.3 2000/09/29 20:21:34 pete ...@@ -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 <filename>~/.vimrc</filename> or equivalent file should contain
the following: the following:
<programlisting> <programlisting>
set tabstop=4 set tabstop=4
</programlisting> </programlisting>
or equivalently from within vi, try or equivalently from within vi, try
<programlisting> <programlisting>
:set ts=4 :set ts=4
</programlisting> </programlisting>
</para> </para>
<para> <para>
The text browsing tools <application>more</application> and The text browsing tools <application>more</application> and
<application>less</application> can be invoked as <application>less</application> can be invoked as
<programlisting> <programlisting>
more -x4 more -x4
less -x4 less -x4
</programlisting> </programlisting>
</para> </para>
</sect1> </sect1>
</chapter> </chapter>
......
...@@ -173,21 +173,9 @@ XXX thomas 1997-12-24 ...@@ -173,21 +173,9 @@ XXX thomas 1997-12-24
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_connect</FUNCTION> performs the following: <PARA><FUNCTION>SPI_connect</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
Initializes the SPI internal Initializes the SPI internal
structures for query execution and memory management. structures for query execution and memory management.
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
<!-- <!--
<REFSECT1 ID="R1-SPI-SPICONNECT-4"> <REFSECT1 ID="R1-SPI-SPICONNECT-4">
...@@ -296,23 +284,11 @@ SPI_finish(void) ...@@ -296,23 +284,11 @@ SPI_finish(void)
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_finish</FUNCTION> performs the following: <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 Disconnects your procedure from the SPI manager and frees all memory
allocations made by your procedure via <Function>palloc</Function> since allocations made by your procedure via <Function>palloc</Function> since
the <Function>SPI_connect</Function>. the <Function>SPI_connect</Function>.
These allocations can't be used any more! See Memory management. These allocations can't be used any more! See Memory management.
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
<!-- <!--
<REFSECT1 ID="R1-SPI-SPIFINISH-4"> <REFSECT1 ID="R1-SPI-SPIFINISH-4">
...@@ -526,22 +502,10 @@ You may pass many queries in one string or query string may be ...@@ -526,22 +502,10 @@ You may pass many queries in one string or query string may be
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_exec</FUNCTION> performs the following: <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 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>. 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. These allocations can't be used any more! See Memory management.
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
<!-- <!--
<REFSECT1 ID="R1-SPI-SPIEXEC-4"> <REFSECT1 ID="R1-SPI-SPIEXEC-4">
...@@ -710,20 +674,8 @@ The plan returned by <Function>SPI_prepare</Function> may be used only in curren ...@@ -710,20 +674,8 @@ The plan returned by <Function>SPI_prepare</Function> may be used only in curren
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_prepare</FUNCTION> performs the following: <PARA><FUNCTION>SPI_prepare</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD TBD
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
--> -->
<!-- <!--
...@@ -865,20 +817,8 @@ Execution plan location. NULL if unsuccessful. ...@@ -865,20 +817,8 @@ Execution plan location. NULL if unsuccessful.
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_saveplan</FUNCTION> performs the following: <PARA><FUNCTION>SPI_saveplan</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD TBD
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
--> -->
<!-- <!--
...@@ -1074,20 +1014,8 @@ assumes that all values (if any) are NOT NULL. ...@@ -1074,20 +1014,8 @@ assumes that all values (if any) are NOT NULL.
<TITLE>Algorithm <TITLE>Algorithm
</TITLE> </TITLE>
<PARA><FUNCTION>SPI_execp</FUNCTION> performs the following: <PARA><FUNCTION>SPI_execp</FUNCTION> performs the following:
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>&bull;
</TERM>
<LISTITEM>
<PARA>
TBD TBD
</PARA> </PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
<PARA>
</PARA>
</REFSECT1> </REFSECT1>
--> -->
<!-- <!--
......
<!-- $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" [ <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!-- must turn on one of these with -i on the jade command line --> <!-- must turn on one of these with -i on the jade command line -->
...@@ -36,8 +36,25 @@ ...@@ -36,8 +36,25 @@
(element lineannotation ($italic-seq$)) (element lineannotation ($italic-seq$))
(element structfield ($mono-seq$)) (element structfield ($mono-seq$))
(element structname ($mono-seq$)) (element structname ($mono-seq$))
(element symbol ($mono-seq$))
(element type ($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; [ <![ %output-html; [
;; customize the html stylesheet ;; customize the html stylesheet
...@@ -116,24 +133,16 @@ ...@@ -116,24 +133,16 @@
(define bop-footnotes #t) (define bop-footnotes #t)
(define %hyphenation% (define %hyphenation%
(if tex-backend #t #f)) (if tex-backend #t #f))
(define %refentry-new-page% #t)
(define %refentry-keep% #f)
(define %graphic-default-extension% (define %graphic-default-extension%
(cond (tex-backend "eps") (cond (tex-backend "eps")
(rtf-backend "ai"))) ;; ApplixWare? (rtf-backend "ai"))) ;; ApplixWare?
;; The rules in the default stylesheet for productname format it as (define %footnote-ulinks%
;; a paragraph. This may be suitable for productname directly (and tex-backend
;; within *info, but it's nonsense when productname is used (>= (string->number "1.73") 1.73)))
;; 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...
;; Format legalnotice justified and with space between paragraphs. ;; Format legalnotice justified and with space between paragraphs.
(mode book-titlepage-verso-mode (mode book-titlepage-verso-mode
...@@ -147,6 +156,67 @@ ...@@ -147,6 +156,67 @@
space-after: (* 0.8 %para-sep%) space-after: (* 0.8 %para-sep%)
(process-children)))) (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-print -->
<![ %output-text; [ <![ %output-text; [
......
<!-- <!--
$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"> <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 ...@@ -12,7 +12,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.47 2001/09/13 15:55:23 pete
<abstract> <abstract>
<para> <para>
A description of the general syntax of SQL. This chapter describes the syntax of SQL.
</para> </para>
</abstract> </abstract>
...@@ -179,8 +179,8 @@ UPDATE "my_table" SET "a" = 5; ...@@ -179,8 +179,8 @@ UPDATE "my_table" SET "a" = 5;
each other. each other.
<footnote> <footnote>
<para> <para>
<productname>Postgres</productname>' folding of unquoted names to lower The folding of unquoted names to lower case in <productname>PostgreSQL</>
case is incompatible with the SQL standard, which says that unquoted is incompatible with the SQL standard, which says that unquoted
names should be folded to upper case. Thus, <literal>foo</literal> names should be folded to upper case. Thus, <literal>foo</literal>
should be equivalent to <literal>"FOO"</literal> not should be equivalent to <literal>"FOO"</literal> not
<literal>"foo"</literal> according to the standard. If you want to <literal>"foo"</literal> according to the standard. If you want to
...@@ -815,8 +815,8 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> ) ...@@ -815,8 +815,8 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
</listitem> </listitem>
<listitem> <listitem>
<para>
<synopsis>( <replaceable>expression</replaceable> )</synopsis> <synopsis>( <replaceable>expression</replaceable> )</synopsis>
<para>
Parentheses are used to group subexpressions and override precedence. Parentheses are used to group subexpressions and override precedence.
</para> </para>
</listitem> </listitem>
...@@ -1039,7 +1039,7 @@ SELECT (5 !) - 6; ...@@ -1039,7 +1039,7 @@ SELECT (5 !) - 6;
<table tocentry="1"> <table tocentry="1">
<title>Operator Precedence (decreasing)</title> <title>Operator Precedence (decreasing)</title>
<tgroup cols="2"> <tgroup cols="3">
<thead> <thead>
<row> <row>
<entry>Operator/Element</entry> <entry>Operator/Element</entry>
......
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