Commit 1d2e0e6d authored by Neil Conway's avatar Neil Conway

Merge some user-submitted suggestions for improvement into the

documentation. Mostly add some <xref>s, fix a few typos, and
document that zlib is required in the installation docs.
parent 1b5cd6dc
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.161 2005/10/14 11:47:56 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.162 2005/10/15 01:47:11 neilc Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -16,9 +16,9 @@ $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.161 2005/10/14 11:47:56 momjia ...@@ -16,9 +16,9 @@ $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.161 2005/10/14 11:47:56 momjia
<para> <para>
<productname>PostgreSQL</productname> has a rich set of native data <productname>PostgreSQL</productname> has a rich set of native data
types available to users. types available to users. Users may add new types to
Users may add new types to <productname>PostgreSQL</productname> using the <productname>PostgreSQL</productname> using the <xref
<command>CREATE TYPE</command> command. linkend="sql-createtype" endterm="sql-createtype-title"> command.
</para> </para>
<para> <para>
......
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/extend.sgml,v 1.29 2004/12/30 03:13:56 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/extend.sgml,v 1.30 2005/10/15 01:47:11 neilc Exp $
--> -->
<chapter id="extend"> <chapter id="extend">
...@@ -131,12 +131,14 @@ $PostgreSQL: pgsql/doc/src/sgml/extend.sgml,v 1.29 2004/12/30 03:13:56 tgl Exp $ ...@@ -131,12 +131,14 @@ $PostgreSQL: pgsql/doc/src/sgml/extend.sgml,v 1.29 2004/12/30 03:13:56 tgl Exp $
<para> <para>
Composite types, or row types, are created whenever the user Composite types, or row types, are created whenever the user
creates a table; it's also possible to define a creates a table. It is also possible to use <xref
<quote>stand-alone</> composite type with no associated table. A linkend="sql-createtype" endterm="sql-createtype-title"> to
composite type is simply a list of base types with associated define a <quote>stand-alone</> composite type with no associated
field names. A value of a composite type is a row or record of table. A composite type is simply a list of types with
field values. The user can access the component fields from associated field names. A value of a composite type is a row or
<acronym>SQL</> queries. record of field values. The user can access the component fields
from <acronym>SQL</> queries. Refer to <xref linkend="rowtypes">
for more information on composite types.
</para> </para>
</sect2> </sect2>
......
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.241 2005/07/20 23:57:46 tgl Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.242 2005/10/15 01:47:11 neilc Exp $ -->
<chapter id="installation"> <chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]> <title><![%standalone-include[<productname>PostgreSQL</>]]>
...@@ -94,9 +94,9 @@ su - postgres ...@@ -94,9 +94,9 @@ su - postgres
<listitem> <listitem>
<para> <para>
<application>gzip</> is needed to unpack the distribution in the <application>tar</> is required to unpack the source
first place.<![%standalone-include;[ If you are reading this, you probably already got distribution in the first place, in addition to either
past that hurdle.]]> <application>gzip</> or <application>bzip2</>.
</para> </para>
</listitem> </listitem>
...@@ -120,6 +120,21 @@ su - postgres ...@@ -120,6 +120,21 @@ su - postgres
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<indexterm>
<primary>zlib</primary>
</indexterm>
The <productname>zlib</productname> compression library will be
used by default. If you don't want to use it then you must
specify the <option>--without-zlib</option> option for
<filename>configure</filename>. Using this option disables
support for compressed archives in <application>pg_dump</> and
<application>pg_restore</>.
</para>
</listitem>
<listitem> <listitem>
<para> <para>
<indexterm> <indexterm>
......
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.77 2005/10/06 20:51:20 neilc Exp $ $PostgreSQL: pgsql/doc/src/sgml/plpgsql.sgml,v 1.78 2005/10/15 01:47:11 neilc Exp $
--> -->
<chapter id="plpgsql"> <chapter id="plpgsql">
...@@ -965,14 +965,15 @@ $$ LANGUAGE plpgsql; ...@@ -965,14 +965,15 @@ $$ LANGUAGE plpgsql;
<para> <para>
In the case of <function>logfunc1</function>, the In the case of <function>logfunc1</function>, the
<productname>PostgreSQL</productname> main parser knows when <productname>PostgreSQL</productname> main parser knows when
preparing the plan for the <command>INSERT</command>, that the string preparing the plan for the <command>INSERT</command> that the
<literal>'now'</literal> should be interpreted as string <literal>'now'</literal> should be interpreted as
<type>timestamp</type> because the target column of <classname>logtable</classname> <type>timestamp</type> because the target column of
is of that type. Thus, it will make a constant from it at this <classname>logtable</classname> is of that type. Thus,
time and this constant value is then used in all invocations of <literal>'now'</literal> will be converted to a constant when the
<function>logfunc1</function> during the lifetime of the <command>INSERT</command> is planned, and then used in all
session. Needless to say that this isn't what the invocations of <function>logfunc1</function> during the lifetime
programmer wanted. of the session. Needless to say, this isn't what the programmer
wanted.
</para> </para>
<para> <para>
...@@ -985,7 +986,7 @@ $$ LANGUAGE plpgsql; ...@@ -985,7 +986,7 @@ $$ LANGUAGE plpgsql;
<application>PL/pgSQL</application> interpreter casts this <application>PL/pgSQL</application> interpreter casts this
string to the <type>timestamp</type> type by calling the string to the <type>timestamp</type> type by calling the
<function>text_out</function> and <function>timestamp_in</function> <function>text_out</function> and <function>timestamp_in</function>
functions for the conversion. So, the computed time stamp is updated functions for the conversion. So, the computed timestamp is updated
on each execution as the programmer expects. on each execution as the programmer expects.
</para> </para>
...@@ -1452,8 +1453,8 @@ GET DIAGNOSTICS integer_var = ROW_COUNT; ...@@ -1452,8 +1453,8 @@ GET DIAGNOSTICS integer_var = ROW_COUNT;
</itemizedlist> </itemizedlist>
<literal>FOUND</literal> is a local variable within each <literal>FOUND</literal> is a local variable within each
<application>PL/pgSQL</application> function; so any changes <application>PL/pgSQL</application> function; any changes to it
to it affect only the current function. affect only the current function.
</para> </para>
</sect2> </sect2>
......
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/prepare.sgml,v 1.15 2004/10/29 19:40:33 tgl Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/prepare.sgml,v 1.16 2005/10/15 01:47:12 neilc Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -63,7 +63,8 @@ PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable c ...@@ -63,7 +63,8 @@ PREPARE <replaceable class="PARAMETER">plan_name</replaceable> [ (<replaceable c
also means that a single prepared statement cannot be used by also means that a single prepared statement cannot be used by
multiple simultaneous database clients; however, each client can create multiple simultaneous database clients; however, each client can create
their own prepared statement to use. The prepared statement can be their own prepared statement to use. The prepared statement can be
manually cleaned up using the <command>DEALLOCATE</> command. manually cleaned up using the <xref linkend="sql-deallocate"
endterm="sql-deallocate-title"> command.
</para> </para>
<para> <para>
......
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.105 2005/10/14 20:48:18 adunstan Exp $ $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.106 2005/10/15 01:47:12 neilc Exp $
--> -->
<sect1 id="xfunc"> <sect1 id="xfunc">
...@@ -881,9 +881,9 @@ CREATE FUNCTION test(int, int) RETURNS int ...@@ -881,9 +881,9 @@ CREATE FUNCTION test(int, int) RETURNS int
Every function has a <firstterm>volatility</> classification, with Every function has a <firstterm>volatility</> classification, with
the possibilities being <literal>VOLATILE</>, <literal>STABLE</>, or the possibilities being <literal>VOLATILE</>, <literal>STABLE</>, or
<literal>IMMUTABLE</>. <literal>VOLATILE</> is the default if the <literal>IMMUTABLE</>. <literal>VOLATILE</> is the default if the
<command>CREATE FUNCTION</command> command does not specify a category. <xref linkend="sql-createfunction" endterm="sql-createfunction-title">
The volatility category is a promise to the optimizer about the behavior command does not specify a category. The volatility category is a
of the function: promise to the optimizer about the behavior of the function:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -1180,8 +1180,9 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision ...@@ -1180,8 +1180,9 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
file is retained in memory. Future calls in the same session to file is retained in memory. Future calls in the same session to
the function(s) in that file will only incur the small overhead of the function(s) in that file will only incur the small overhead of
a symbol table lookup. If you need to force a reload of an object a symbol table lookup. If you need to force a reload of an object
file, for example after recompiling it, use the <command>LOAD</> file, for example after recompiling it, use the <xref
command or begin a fresh session. linkend="sql-load" endterm="sql-load-title"> command or begin a
fresh session.
</para> </para>
<para> <para>
...@@ -1652,7 +1653,7 @@ CREATE FUNCTION copytext(text) RETURNS text ...@@ -1652,7 +1653,7 @@ CREATE FUNCTION copytext(text) RETURNS text
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION concat_text(text, text) RETURNS text CREATE FUNCTION concat_text(text, text) RETURNS text
AS '<replaceable>DIRECTORY</replaceable>/funcs', 'concat_text', AS '<replaceable>DIRECTORY</replaceable>/funcs', 'concat_text'
LANGUAGE C STRICT; LANGUAGE C STRICT;
</programlisting> </programlisting>
</para> </para>
......
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