Commit c29c5789 authored by Peter Eisentraut's avatar Peter Eisentraut

Don't use SGML empty tags

For DocBook XML compatibility, don't use SGML empty tags (</>) anymore,
replace by the full tag name.  Add a warning option to catch future
occurrences.

Alexander Lakhin, Jürgen Purtz
parent 6ecabead
...@@ -66,10 +66,11 @@ ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML) ...@@ -66,10 +66,11 @@ ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML)
# Enable some extra warnings # Enable some extra warnings
# -wfully-tagged needed to throw a warning on missing tags # -wfully-tagged needed to throw a warning on missing tags
# for older tool chains, 2007-08-31 # for older tool chains, 2007-08-31
override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged override SPFLAGS += -wall -wno-unused-param -wfully-tagged
# Additional warnings for XML compatibility. The conditional is meant # Additional warnings for XML compatibility. The conditional is meant
# to detect whether we are using OpenSP rather than the ancient # to detect whether we are using OpenSP rather than the ancient
# original SP. # original SP.
override SPFLAGS += -wempty
ifneq (,$(filter o%,$(notdir $(OSX)))) ifneq (,$(filter o%,$(notdir $(OSX))))
override SPFLAGS += -wdata-delim -winstance-ignore-ms -winstance-include-ms -winstance-param-entity override SPFLAGS += -wdata-delim -winstance-ignore-ms -winstance-include-ms -winstance-param-entity
endif endif
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<title>Acronyms</title> <title>Acronyms</title>
<para> <para>
This is a list of acronyms commonly used in the <productname>PostgreSQL</> This is a list of acronyms commonly used in the <productname>PostgreSQL</productname>
documentation and in discussions about <productname>PostgreSQL</>. documentation and in discussions about <productname>PostgreSQL</productname>.
<variablelist> <variablelist>
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<ulink <ulink
url="http://en.wikipedia.org/wiki/Data_Definition_Language">Data url="http://en.wikipedia.org/wiki/Data_Definition_Language">Data
Definition Language</ulink>, SQL commands such as <command>CREATE Definition Language</ulink>, SQL commands such as <command>CREATE
TABLE</>, <command>ALTER USER</> TABLE</command>, <command>ALTER USER</command>
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -164,8 +164,8 @@ ...@@ -164,8 +164,8 @@
<para> <para>
<ulink <ulink
url="http://en.wikipedia.org/wiki/Data_Manipulation_Language">Data url="http://en.wikipedia.org/wiki/Data_Manipulation_Language">Data
Manipulation Language</ulink>, SQL commands such as <command>INSERT</>, Manipulation Language</ulink>, SQL commands such as <command>INSERT</command>,
<command>UPDATE</>, <command>DELETE</> <command>UPDATE</command>, <command>DELETE</command>
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<listitem> <listitem>
<para> <para>
<link linkend="config-setting">Grand Unified Configuration</link>, <link linkend="config-setting">Grand Unified Configuration</link>,
the <productname>PostgreSQL</> subsystem that handles server configuration the <productname>PostgreSQL</productname> subsystem that handles server configuration
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
<term><acronym>LSN</acronym></term> <term><acronym>LSN</acronym></term>
<listitem> <listitem>
<para> <para>
Log Sequence Number, see <link linkend="datatype-pg-lsn"><type>pg_lsn</></link> Log Sequence Number, see <link linkend="datatype-pg-lsn"><type>pg_lsn</type></link>
and <link linkend="wal-internals">WAL Internals</link>. and <link linkend="wal-internals">WAL Internals</link>.
</para> </para>
</listitem> </listitem>
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
<term><acronym>PGSQL</acronym></term> <term><acronym>PGSQL</acronym></term>
<listitem> <listitem>
<para> <para>
<link linkend="postgres"><productname>PostgreSQL</></link> <link linkend="postgres"><productname>PostgreSQL</productname></link>
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -495,7 +495,7 @@ ...@@ -495,7 +495,7 @@
<term><acronym>PGXS</acronym></term> <term><acronym>PGXS</acronym></term>
<listitem> <listitem>
<para> <para>
<link linkend="extend-pgxs"><productname>PostgreSQL</> Extension System</link> <link linkend="extend-pgxs"><productname>PostgreSQL</productname> Extension System</link>
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
</indexterm> </indexterm>
<para> <para>
<filename>adminpack</> provides a number of support functions which <filename>adminpack</filename> provides a number of support functions which
<application>pgAdmin</> and other administration and management tools can <application>pgAdmin</application> and other administration and management tools can
use to provide additional functionality, such as remote management use to provide additional functionality, such as remote management
of server log files. of server log files.
Use of all these functions is restricted to superusers. Use of all these functions is restricted to superusers.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</para> </para>
<table id="functions-adminpack-table"> <table id="functions-adminpack-table">
<title><filename>adminpack</> Functions</title> <title><filename>adminpack</filename> Functions</title>
<tgroup cols="3"> <tgroup cols="3">
<thead> <thead>
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry> <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<entry><function>pg_catalog.pg_logdir_ls()</function></entry> <entry><function>pg_catalog.pg_logdir_ls()</function></entry>
<entry><type>setof record</type></entry> <entry><type>setof record</type></entry>
<entry> <entry>
List the log files in the <varname>log_directory</> directory List the log files in the <varname>log_directory</varname> directory
</entry> </entry>
</row> </row>
</tbody> </tbody>
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
<primary>pg_file_write</primary> <primary>pg_file_write</primary>
</indexterm> </indexterm>
<para> <para>
<function>pg_file_write</> writes the specified <parameter>data</> into <function>pg_file_write</function> writes the specified <parameter>data</parameter> into
the file named by <parameter>filename</>. If <parameter>append</> is the file named by <parameter>filename</parameter>. If <parameter>append</parameter> is
false, the file must not already exist. If <parameter>append</> is true, false, the file must not already exist. If <parameter>append</parameter> is true,
the file can already exist, and will be appended to if so. the file can already exist, and will be appended to if so.
Returns the number of bytes written. Returns the number of bytes written.
</para> </para>
...@@ -80,15 +80,15 @@ ...@@ -80,15 +80,15 @@
<primary>pg_file_rename</primary> <primary>pg_file_rename</primary>
</indexterm> </indexterm>
<para> <para>
<function>pg_file_rename</> renames a file. If <parameter>archivename</> <function>pg_file_rename</function> renames a file. If <parameter>archivename</parameter>
is omitted or NULL, it simply renames <parameter>oldname</> is omitted or NULL, it simply renames <parameter>oldname</parameter>
to <parameter>newname</> (which must not already exist). to <parameter>newname</parameter> (which must not already exist).
If <parameter>archivename</> is provided, it first If <parameter>archivename</parameter> is provided, it first
renames <parameter>newname</> to <parameter>archivename</> (which must renames <parameter>newname</parameter> to <parameter>archivename</parameter> (which must
not already exist), and then renames <parameter>oldname</> not already exist), and then renames <parameter>oldname</parameter>
to <parameter>newname</>. In event of failure of the second rename step, to <parameter>newname</parameter>. In event of failure of the second rename step,
it will try to rename <parameter>archivename</> back it will try to rename <parameter>archivename</parameter> back
to <parameter>newname</> before reporting the error. to <parameter>newname</parameter> before reporting the error.
Returns true on success, false if the source file(s) are not present or Returns true on success, false if the source file(s) are not present or
not writable; other cases throw errors. not writable; other cases throw errors.
</para> </para>
...@@ -97,19 +97,19 @@ ...@@ -97,19 +97,19 @@
<primary>pg_file_unlink</primary> <primary>pg_file_unlink</primary>
</indexterm> </indexterm>
<para> <para>
<function>pg_file_unlink</> removes the specified file. <function>pg_file_unlink</function> removes the specified file.
Returns true on success, false if the specified file is not present Returns true on success, false if the specified file is not present
or the <function>unlink()</> call fails; other cases throw errors. or the <function>unlink()</function> call fails; other cases throw errors.
</para> </para>
<indexterm> <indexterm>
<primary>pg_logdir_ls</primary> <primary>pg_logdir_ls</primary>
</indexterm> </indexterm>
<para> <para>
<function>pg_logdir_ls</> returns the start timestamps and path <function>pg_logdir_ls</function> returns the start timestamps and path
names of all the log files in the <xref linkend="guc-log-directory"> names of all the log files in the <xref linkend="guc-log-directory">
directory. The <xref linkend="guc-log-filename"> parameter must have its directory. The <xref linkend="guc-log-filename"> parameter must have its
default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</>) to use this default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>) to use this
function. function.
</para> </para>
...@@ -119,12 +119,12 @@ ...@@ -119,12 +119,12 @@
and should not be used in new applications; instead use those shown and should not be used in new applications; instead use those shown
in <xref linkend="functions-admin-signal-table"> in <xref linkend="functions-admin-signal-table">
and <xref linkend="functions-admin-genfile-table">. These functions are and <xref linkend="functions-admin-genfile-table">. These functions are
provided in <filename>adminpack</> only for compatibility with old provided in <filename>adminpack</filename> only for compatibility with old
versions of <application>pgAdmin</>. versions of <application>pgAdmin</application>.
</para> </para>
<table id="functions-adminpack-deprecated-table"> <table id="functions-adminpack-deprecated-table">
<title>Deprecated <filename>adminpack</> Functions</title> <title>Deprecated <filename>adminpack</filename> Functions</title>
<tgroup cols="3"> <tgroup cols="3">
<thead> <thead>
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry> <row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
...@@ -136,22 +136,22 @@ ...@@ -136,22 +136,22 @@
<entry><function>pg_catalog.pg_file_read(filename text, offset bigint, nbytes bigint)</function></entry> <entry><function>pg_catalog.pg_file_read(filename text, offset bigint, nbytes bigint)</function></entry>
<entry><type>text</type></entry> <entry><type>text</type></entry>
<entry> <entry>
Alternate name for <function>pg_read_file()</> Alternate name for <function>pg_read_file()</function>
</entry> </entry>
</row> </row>
<row> <row>
<entry><function>pg_catalog.pg_file_length(filename text)</function></entry> <entry><function>pg_catalog.pg_file_length(filename text)</function></entry>
<entry><type>bigint</type></entry> <entry><type>bigint</type></entry>
<entry> <entry>
Same as <structfield>size</> column returned Same as <structfield>size</structfield> column returned
by <function>pg_stat_file()</> by <function>pg_stat_file()</function>
</entry> </entry>
</row> </row>
<row> <row>
<entry><function>pg_catalog.pg_logfile_rotate()</function></entry> <entry><function>pg_catalog.pg_logfile_rotate()</function></entry>
<entry><type>integer</type></entry> <entry><type>integer</type></entry>
<entry> <entry>
Alternate name for <function>pg_rotate_logfile()</>, but note that it Alternate name for <function>pg_rotate_logfile()</function>, but note that it
returns integer 0 or 1 rather than <type>boolean</type> returns integer 0 or 1 rather than <type>boolean</type>
</entry> </entry>
</row> </row>
......
This diff is collapsed.
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
</indexterm> </indexterm>
<para> <para>
The <filename>amcheck</> module provides functions that allow you to The <filename>amcheck</filename> module provides functions that allow you to
verify the logical consistency of the structure of indexes. If the verify the logical consistency of the structure of indexes. If the
structure appears to be valid, no error is raised. structure appears to be valid, no error is raised.
</para> </para>
<para> <para>
The functions verify various <emphasis>invariants</> in the The functions verify various <emphasis>invariants</emphasis> in the
structure of the representation of particular indexes. The structure of the representation of particular indexes. The
correctness of the access method functions behind index scans and correctness of the access method functions behind index scans and
other important operations relies on these invariants always other important operations relies on these invariants always
holding. For example, certain functions verify, among other things, holding. For example, certain functions verify, among other things,
that all B-Tree pages have items in <quote>logical</> order (e.g., that all B-Tree pages have items in <quote>logical</quote> order (e.g.,
for B-Tree indexes on <type>text</>, index tuples should be in for B-Tree indexes on <type>text</type>, index tuples should be in
collated lexical order). If that particular invariant somehow fails collated lexical order). If that particular invariant somehow fails
to hold, we can expect binary searches on the affected page to to hold, we can expect binary searches on the affected page to
incorrectly guide index scans, resulting in wrong answers to SQL incorrectly guide index scans, resulting in wrong answers to SQL
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
functions. functions.
</para> </para>
<para> <para>
<filename>amcheck</> functions may be used only by superusers. <filename>amcheck</filename> functions may be used only by superusers.
</para> </para>
<sect2> <sect2>
...@@ -82,7 +82,7 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -82,7 +82,7 @@ ORDER BY c.relpages DESC LIMIT 10;
(10 rows) (10 rows)
</screen> </screen>
This example shows a session that performs verification of every This example shows a session that performs verification of every
catalog index in the database <quote>test</>. Details of just catalog index in the database <quote>test</quote>. Details of just
the 10 largest indexes verified are displayed. Since no error the 10 largest indexes verified are displayed. Since no error
is raised, all indexes tested appear to be logically consistent. is raised, all indexes tested appear to be logically consistent.
Naturally, this query could easily be changed to call Naturally, this query could easily be changed to call
...@@ -90,10 +90,10 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -90,10 +90,10 @@ ORDER BY c.relpages DESC LIMIT 10;
database where verification is supported. database where verification is supported.
</para> </para>
<para> <para>
<function>bt_index_check</function> acquires an <literal>AccessShareLock</> <function>bt_index_check</function> acquires an <literal>AccessShareLock</literal>
on the target index and the heap relation it belongs to. This lock mode on the target index and the heap relation it belongs to. This lock mode
is the same lock mode acquired on relations by simple is the same lock mode acquired on relations by simple
<literal>SELECT</> statements. <literal>SELECT</literal> statements.
<function>bt_index_check</function> does not verify invariants <function>bt_index_check</function> does not verify invariants
that span child/parent relationships, nor does it verify that that span child/parent relationships, nor does it verify that
the target index is consistent with its heap relation. When a the target index is consistent with its heap relation. When a
...@@ -132,13 +132,13 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -132,13 +132,13 @@ ORDER BY c.relpages DESC LIMIT 10;
logical inconsistency or other problem. logical inconsistency or other problem.
</para> </para>
<para> <para>
A <literal>ShareLock</> is required on the target index by A <literal>ShareLock</literal> is required on the target index by
<function>bt_index_parent_check</function> (a <function>bt_index_parent_check</function> (a
<literal>ShareLock</> is also acquired on the heap relation). <literal>ShareLock</literal> is also acquired on the heap relation).
These locks prevent concurrent data modification from These locks prevent concurrent data modification from
<command>INSERT</>, <command>UPDATE</>, and <command>DELETE</> <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command>
commands. The locks also prevent the underlying relation from commands. The locks also prevent the underlying relation from
being concurrently processed by <command>VACUUM</>, as well as being concurrently processed by <command>VACUUM</command>, as well as
all other utility commands. Note that the function holds locks all other utility commands. Note that the function holds locks
only while running, not for the entire transaction. only while running, not for the entire transaction.
</para> </para>
...@@ -159,13 +159,13 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -159,13 +159,13 @@ ORDER BY c.relpages DESC LIMIT 10;
</sect2> </sect2>
<sect2> <sect2>
<title>Using <filename>amcheck</> effectively</title> <title>Using <filename>amcheck</filename> effectively</title>
<para> <para>
<filename>amcheck</> can be effective at detecting various types of <filename>amcheck</filename> can be effective at detecting various types of
failure modes that <link failure modes that <link
linkend="app-initdb-data-checksums"><application>data page linkend="app-initdb-data-checksums"><application>data page
checksums</></link> will always fail to catch. These include: checksums</application></link> will always fail to catch. These include:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -176,13 +176,13 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -176,13 +176,13 @@ ORDER BY c.relpages DESC LIMIT 10;
<para> <para>
This includes issues caused by the comparison rules of operating This includes issues caused by the comparison rules of operating
system collations changing. Comparisons of datums of a collatable system collations changing. Comparisons of datums of a collatable
type like <type>text</> must be immutable (just as all type like <type>text</type> must be immutable (just as all
comparisons used for B-Tree index scans must be immutable), which comparisons used for B-Tree index scans must be immutable), which
implies that operating system collation rules must never change. implies that operating system collation rules must never change.
Though rare, updates to operating system collation rules can Though rare, updates to operating system collation rules can
cause these issues. More commonly, an inconsistency in the cause these issues. More commonly, an inconsistency in the
collation order between a master server and a standby server is collation order between a master server and a standby server is
implicated, possibly because the <emphasis>major</> operating implicated, possibly because the <emphasis>major</emphasis> operating
system version in use is inconsistent. Such inconsistencies will system version in use is inconsistent. Such inconsistencies will
generally only arise on standby servers, and so can generally generally only arise on standby servers, and so can generally
only be detected on standby servers. only be detected on standby servers.
...@@ -190,25 +190,25 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -190,25 +190,25 @@ ORDER BY c.relpages DESC LIMIT 10;
<para> <para>
If a problem like this arises, it may not affect each individual If a problem like this arises, it may not affect each individual
index that is ordered using an affected collation, simply because index that is ordered using an affected collation, simply because
<emphasis>indexed</> values might happen to have the same <emphasis>indexed</emphasis> values might happen to have the same
absolute ordering regardless of the behavioral inconsistency. See absolute ordering regardless of the behavioral inconsistency. See
<xref linkend="locale"> and <xref linkend="collation"> for <xref linkend="locale"> and <xref linkend="collation"> for
further details about how <productname>PostgreSQL</> uses further details about how <productname>PostgreSQL</productname> uses
operating system locales and collations. operating system locales and collations.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Corruption caused by hypothetical undiscovered bugs in the Corruption caused by hypothetical undiscovered bugs in the
underlying <productname>PostgreSQL</> access method code or sort underlying <productname>PostgreSQL</productname> access method code or sort
code. code.
</para> </para>
<para> <para>
Automatic verification of the structural integrity of indexes Automatic verification of the structural integrity of indexes
plays a role in the general testing of new or proposed plays a role in the general testing of new or proposed
<productname>PostgreSQL</> features that could plausibly allow a <productname>PostgreSQL</productname> features that could plausibly allow a
logical inconsistency to be introduced. One obvious testing logical inconsistency to be introduced. One obvious testing
strategy is to call <filename>amcheck</> functions continuously strategy is to call <filename>amcheck</filename> functions continuously
when running the standard regression tests. See <xref when running the standard regression tests. See <xref
linkend="regress-run"> for details on running the tests. linkend="regress-run"> for details on running the tests.
</para> </para>
...@@ -219,12 +219,12 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -219,12 +219,12 @@ ORDER BY c.relpages DESC LIMIT 10;
simply not be enabled. simply not be enabled.
</para> </para>
<para> <para>
Note that <filename>amcheck</> examines a page as represented in some Note that <filename>amcheck</filename> examines a page as represented in some
shared memory buffer at the time of verification if there is only a shared memory buffer at the time of verification if there is only a
shared buffer hit when accessing the block. Consequently, shared buffer hit when accessing the block. Consequently,
<filename>amcheck</> does not necessarily examine data read from the <filename>amcheck</filename> does not necessarily examine data read from the
file system at the time of verification. Note that when checksums are file system at the time of verification. Note that when checksums are
enabled, <filename>amcheck</> may raise an error due to a checksum enabled, <filename>amcheck</filename> may raise an error due to a checksum
failure when a corrupt block is read into a buffer. failure when a corrupt block is read into a buffer.
</para> </para>
</listitem> </listitem>
...@@ -234,7 +234,7 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -234,7 +234,7 @@ ORDER BY c.relpages DESC LIMIT 10;
and operating system. and operating system.
</para> </para>
<para> <para>
<productname>PostgreSQL</> does not protect against correctable <productname>PostgreSQL</productname> does not protect against correctable
memory errors and it is assumed you will operate using RAM that memory errors and it is assumed you will operate using RAM that
uses industry standard Error Correcting Codes (ECC) or better uses industry standard Error Correcting Codes (ECC) or better
protection. However, ECC memory is typically only immune to protection. However, ECC memory is typically only immune to
...@@ -244,7 +244,7 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -244,7 +244,7 @@ ORDER BY c.relpages DESC LIMIT 10;
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
In general, <filename>amcheck</> can only prove the presence of In general, <filename>amcheck</filename> can only prove the presence of
corruption; it cannot prove its absence. corruption; it cannot prove its absence.
</para> </para>
...@@ -252,19 +252,19 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -252,19 +252,19 @@ ORDER BY c.relpages DESC LIMIT 10;
<sect2> <sect2>
<title>Repairing corruption</title> <title>Repairing corruption</title>
<para> <para>
No error concerning corruption raised by <filename>amcheck</> should No error concerning corruption raised by <filename>amcheck</filename> should
ever be a false positive. In practice, <filename>amcheck</> is more ever be a false positive. In practice, <filename>amcheck</filename> is more
likely to find software bugs than problems with hardware. likely to find software bugs than problems with hardware.
<filename>amcheck</> raises errors in the event of conditions that, <filename>amcheck</filename> raises errors in the event of conditions that,
by definition, should never happen, and so careful analysis of by definition, should never happen, and so careful analysis of
<filename>amcheck</> errors is often required. <filename>amcheck</filename> errors is often required.
</para> </para>
<para> <para>
There is no general method of repairing problems that There is no general method of repairing problems that
<filename>amcheck</> detects. An explanation for the root cause of <filename>amcheck</filename> detects. An explanation for the root cause of
an invariant violation should be sought. <xref an invariant violation should be sought. <xref
linkend="pageinspect"> may play a useful role in diagnosing linkend="pageinspect"> may play a useful role in diagnosing
corruption that <filename>amcheck</> detects. A <command>REINDEX</> corruption that <filename>amcheck</filename> detects. A <command>REINDEX</command>
may not be effective in repairing corruption. may not be effective in repairing corruption.
</para> </para>
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<para> <para>
<productname>PostgreSQL</productname> is implemented using a <productname>PostgreSQL</productname> is implemented using a
simple <quote>process per user</> client/server model. In this model simple <quote>process per user</quote> client/server model. In this model
there is one <firstterm>client process</firstterm> connected to there is one <firstterm>client process</firstterm> connected to
exactly one <firstterm>server process</firstterm>. As we do not exactly one <firstterm>server process</firstterm>. As we do not
know ahead of time how many connections will be made, we have to know ahead of time how many connections will be made, we have to
...@@ -137,9 +137,9 @@ ...@@ -137,9 +137,9 @@
The client process can be any program that understands the The client process can be any program that understands the
<productname>PostgreSQL</productname> protocol described in <productname>PostgreSQL</productname> protocol described in
<xref linkend="protocol">. Many clients are based on the <xref linkend="protocol">. Many clients are based on the
C-language library <application>libpq</>, but several independent C-language library <application>libpq</application>, but several independent
implementations of the protocol exist, such as the Java implementations of the protocol exist, such as the Java
<application>JDBC</> driver. <application>JDBC</application> driver.
</para> </para>
<para> <para>
...@@ -184,8 +184,8 @@ ...@@ -184,8 +184,8 @@
text) for valid syntax. If the syntax is correct a text) for valid syntax. If the syntax is correct a
<firstterm>parse tree</firstterm> is built up and handed back; <firstterm>parse tree</firstterm> is built up and handed back;
otherwise an error is returned. The parser and lexer are otherwise an error is returned. The parser and lexer are
implemented using the well-known Unix tools <application>bison</> implemented using the well-known Unix tools <application>bison</application>
and <application>flex</>. and <application>flex</application>.
</para> </para>
<para> <para>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
back by the parser as input and does the semantic interpretation needed back by the parser as input and does the semantic interpretation needed
to understand which tables, functions, and operators are referenced by to understand which tables, functions, and operators are referenced by
the query. The data structure that is built to represent this the query. The data structure that is built to represent this
information is called the <firstterm>query tree</>. information is called the <firstterm>query tree</firstterm>.
</para> </para>
<para> <para>
...@@ -259,10 +259,10 @@ ...@@ -259,10 +259,10 @@
system catalog lookups can only be done within a transaction, and we system catalog lookups can only be done within a transaction, and we
do not wish to start a transaction immediately upon receiving a query do not wish to start a transaction immediately upon receiving a query
string. The raw parsing stage is sufficient to identify the transaction string. The raw parsing stage is sufficient to identify the transaction
control commands (<command>BEGIN</>, <command>ROLLBACK</>, etc), and control commands (<command>BEGIN</command>, <command>ROLLBACK</command>, etc), and
these can then be correctly executed without any further analysis. these can then be correctly executed without any further analysis.
Once we know that we are dealing with an actual query (such as Once we know that we are dealing with an actual query (such as
<command>SELECT</> or <command>UPDATE</>), it is okay to <command>SELECT</command> or <command>UPDATE</command>), it is okay to
start a transaction if we're not already in one. Only then can the start a transaction if we're not already in one. Only then can the
transformation process be invoked. transformation process be invoked.
</para> </para>
...@@ -270,10 +270,10 @@ ...@@ -270,10 +270,10 @@
<para> <para>
The query tree created by the transformation process is structurally The query tree created by the transformation process is structurally
similar to the raw parse tree in most places, but it has many differences similar to the raw parse tree in most places, but it has many differences
in detail. For example, a <structname>FuncCall</> node in the in detail. For example, a <structname>FuncCall</structname> node in the
parse tree represents something that looks syntactically like a function parse tree represents something that looks syntactically like a function
call. This might be transformed to either a <structname>FuncExpr</> call. This might be transformed to either a <structname>FuncExpr</structname>
or <structname>Aggref</> node depending on whether the referenced or <structname>Aggref</structname> node depending on whether the referenced
name turns out to be an ordinary function or an aggregate function. name turns out to be an ordinary function or an aggregate function.
Also, information about the actual data types of columns and expression Also, information about the actual data types of columns and expression
results is added to the query tree. results is added to the query tree.
...@@ -354,10 +354,10 @@ ...@@ -354,10 +354,10 @@
<para> <para>
The planner's search procedure actually works with data structures The planner's search procedure actually works with data structures
called <firstterm>paths</>, which are simply cut-down representations of called <firstterm>paths</firstterm>, which are simply cut-down representations of
plans containing only as much information as the planner needs to make plans containing only as much information as the planner needs to make
its decisions. After the cheapest path is determined, a full-fledged its decisions. After the cheapest path is determined, a full-fledged
<firstterm>plan tree</> is built to pass to the executor. This represents <firstterm>plan tree</firstterm> is built to pass to the executor. This represents
the desired execution plan in sufficient detail for the executor to run it. the desired execution plan in sufficient detail for the executor to run it.
In the rest of this section we'll ignore the distinction between paths In the rest of this section we'll ignore the distinction between paths
and plans. and plans.
...@@ -378,12 +378,12 @@ ...@@ -378,12 +378,12 @@
<literal>relation.attribute OPR constant</literal>. If <literal>relation.attribute OPR constant</literal>. If
<literal>relation.attribute</literal> happens to match the key of the B-tree <literal>relation.attribute</literal> happens to match the key of the B-tree
index and <literal>OPR</literal> is one of the operators listed in index and <literal>OPR</literal> is one of the operators listed in
the index's <firstterm>operator class</>, another plan is created using the index's <firstterm>operator class</firstterm>, another plan is created using
the B-tree index to scan the relation. If there are further indexes the B-tree index to scan the relation. If there are further indexes
present and the restrictions in the query happen to match a key of an present and the restrictions in the query happen to match a key of an
index, further plans will be considered. Index scan plans are also index, further plans will be considered. Index scan plans are also
generated for indexes that have a sort ordering that can match the generated for indexes that have a sort ordering that can match the
query's <literal>ORDER BY</> clause (if any), or a sort ordering that query's <literal>ORDER BY</literal> clause (if any), or a sort ordering that
might be useful for merge joining (see below). might be useful for merge joining (see below).
</para> </para>
...@@ -462,9 +462,9 @@ ...@@ -462,9 +462,9 @@
the base relations, plus nested-loop, merge, or hash join nodes as the base relations, plus nested-loop, merge, or hash join nodes as
needed, plus any auxiliary steps needed, such as sort nodes or needed, plus any auxiliary steps needed, such as sort nodes or
aggregate-function calculation nodes. Most of these plan node aggregate-function calculation nodes. Most of these plan node
types have the additional ability to do <firstterm>selection</> types have the additional ability to do <firstterm>selection</firstterm>
(discarding rows that do not meet a specified Boolean condition) (discarding rows that do not meet a specified Boolean condition)
and <firstterm>projection</> (computation of a derived column set and <firstterm>projection</firstterm> (computation of a derived column set
based on given column values, that is, evaluation of scalar based on given column values, that is, evaluation of scalar
expressions where needed). One of the responsibilities of the expressions where needed). One of the responsibilities of the
planner is to attach selection conditions from the planner is to attach selection conditions from the
...@@ -496,7 +496,7 @@ ...@@ -496,7 +496,7 @@
subplan) is, let's say, a subplan) is, let's say, a
<literal>Sort</literal> node and again recursion is needed to obtain <literal>Sort</literal> node and again recursion is needed to obtain
an input row. The child node of the <literal>Sort</literal> might an input row. The child node of the <literal>Sort</literal> might
be a <literal>SeqScan</> node, representing actual reading of a table. be a <literal>SeqScan</literal> node, representing actual reading of a table.
Execution of this node causes the executor to fetch a row from the Execution of this node causes the executor to fetch a row from the
table and return it up to the calling node. The <literal>Sort</literal> table and return it up to the calling node. The <literal>Sort</literal>
node will repeatedly call its child to obtain all the rows to be sorted. node will repeatedly call its child to obtain all the rows to be sorted.
...@@ -529,24 +529,24 @@ ...@@ -529,24 +529,24 @@
<para> <para>
The executor mechanism is used to evaluate all four basic SQL query types: The executor mechanism is used to evaluate all four basic SQL query types:
<command>SELECT</>, <command>INSERT</>, <command>UPDATE</>, and <command>SELECT</command>, <command>INSERT</command>, <command>UPDATE</command>, and
<command>DELETE</>. For <command>SELECT</>, the top-level executor <command>DELETE</command>. For <command>SELECT</command>, the top-level executor
code only needs to send each row returned by the query plan tree off code only needs to send each row returned by the query plan tree off
to the client. For <command>INSERT</>, each returned row is inserted to the client. For <command>INSERT</command>, each returned row is inserted
into the target table specified for the <command>INSERT</>. This is into the target table specified for the <command>INSERT</command>. This is
done in a special top-level plan node called <literal>ModifyTable</>. done in a special top-level plan node called <literal>ModifyTable</literal>.
(A simple (A simple
<command>INSERT ... VALUES</> command creates a trivial plan tree <command>INSERT ... VALUES</command> command creates a trivial plan tree
consisting of a single <literal>Result</> node, which computes just one consisting of a single <literal>Result</literal> node, which computes just one
result row, and <literal>ModifyTable</> above it to perform the insertion. result row, and <literal>ModifyTable</literal> above it to perform the insertion.
But <command>INSERT ... SELECT</> can demand the full power But <command>INSERT ... SELECT</command> can demand the full power
of the executor mechanism.) For <command>UPDATE</>, the planner arranges of the executor mechanism.) For <command>UPDATE</command>, the planner arranges
that each computed row includes all the updated column values, plus that each computed row includes all the updated column values, plus
the <firstterm>TID</> (tuple ID, or row ID) of the original target row; the <firstterm>TID</firstterm> (tuple ID, or row ID) of the original target row;
this data is fed into a <literal>ModifyTable</> node, which uses the this data is fed into a <literal>ModifyTable</literal> node, which uses the
information to create a new updated row and mark the old row deleted. information to create a new updated row and mark the old row deleted.
For <command>DELETE</>, the only column that is actually returned by the For <command>DELETE</command>, the only column that is actually returned by the
plan is the TID, and the <literal>ModifyTable</> node simply uses the TID plan is the TID, and the <literal>ModifyTable</literal> node simply uses the TID
to visit each target row and mark it deleted. to visit each target row and mark it deleted.
</para> </para>
......
This diff is collapsed.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<para> <para>
In order to function, this module must be loaded via In order to function, this module must be loaded via
<xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</>. <xref linkend="guc-shared-preload-libraries"> in <filename>postgresql.conf</filename>.
</para> </para>
<sect2> <sect2>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<term> <term>
<varname>auth_delay.milliseconds</varname> (<type>int</type>) <varname>auth_delay.milliseconds</varname> (<type>int</type>)
<indexterm> <indexterm>
<primary><varname>auth_delay.milliseconds</> configuration parameter</primary> <primary><varname>auth_delay.milliseconds</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</variablelist> </variablelist>
<para> <para>
These parameters must be set in <filename>postgresql.conf</>. These parameters must be set in <filename>postgresql.conf</filename>.
Typical usage might be: Typical usage might be:
</para> </para>
......
...@@ -24,10 +24,10 @@ LOAD 'auto_explain'; ...@@ -24,10 +24,10 @@ LOAD 'auto_explain';
</programlisting> </programlisting>
(You must be superuser to do that.) More typical usage is to preload (You must be superuser to do that.) More typical usage is to preload
it into some or all sessions by including <literal>auto_explain</> in it into some or all sessions by including <literal>auto_explain</literal> in
<xref linkend="guc-session-preload-libraries"> or <xref linkend="guc-session-preload-libraries"> or
<xref linkend="guc-shared-preload-libraries"> in <xref linkend="guc-shared-preload-libraries"> in
<filename>postgresql.conf</>. Then you can track unexpectedly slow queries <filename>postgresql.conf</filename>. Then you can track unexpectedly slow queries
no matter when they happen. Of course there is a price in overhead for no matter when they happen. Of course there is a price in overhead for
that. that.
</para> </para>
...@@ -47,7 +47,7 @@ LOAD 'auto_explain'; ...@@ -47,7 +47,7 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_min_duration</varname> (<type>integer</type>) <varname>auto_explain.log_min_duration</varname> (<type>integer</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_min_duration</> configuration parameter</primary> <primary><varname>auto_explain.log_min_duration</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
...@@ -66,13 +66,13 @@ LOAD 'auto_explain'; ...@@ -66,13 +66,13 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_analyze</varname> (<type>boolean</type>) <varname>auto_explain.log_analyze</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_analyze</> configuration parameter</primary> <primary><varname>auto_explain.log_analyze</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
<varname>auto_explain.log_analyze</varname> causes <command>EXPLAIN ANALYZE</> <varname>auto_explain.log_analyze</varname> causes <command>EXPLAIN ANALYZE</command>
output, rather than just <command>EXPLAIN</> output, to be printed output, rather than just <command>EXPLAIN</command> output, to be printed
when an execution plan is logged. This parameter is off by default. when an execution plan is logged. This parameter is off by default.
Only superusers can change this setting. Only superusers can change this setting.
</para> </para>
...@@ -92,14 +92,14 @@ LOAD 'auto_explain'; ...@@ -92,14 +92,14 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_buffers</varname> (<type>boolean</type>) <varname>auto_explain.log_buffers</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_buffers</> configuration parameter</primary> <primary><varname>auto_explain.log_buffers</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
<varname>auto_explain.log_buffers</varname> controls whether buffer <varname>auto_explain.log_buffers</varname> controls whether buffer
usage statistics are printed when an execution plan is logged; it's usage statistics are printed when an execution plan is logged; it's
equivalent to the <literal>BUFFERS</> option of <command>EXPLAIN</>. equivalent to the <literal>BUFFERS</literal> option of <command>EXPLAIN</command>.
This parameter has no effect This parameter has no effect
unless <varname>auto_explain.log_analyze</varname> is enabled. unless <varname>auto_explain.log_analyze</varname> is enabled.
This parameter is off by default. This parameter is off by default.
...@@ -112,14 +112,14 @@ LOAD 'auto_explain'; ...@@ -112,14 +112,14 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_timing</varname> (<type>boolean</type>) <varname>auto_explain.log_timing</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_timing</> configuration parameter</primary> <primary><varname>auto_explain.log_timing</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
<varname>auto_explain.log_timing</varname> controls whether per-node <varname>auto_explain.log_timing</varname> controls whether per-node
timing information is printed when an execution plan is logged; it's timing information is printed when an execution plan is logged; it's
equivalent to the <literal>TIMING</> option of <command>EXPLAIN</>. equivalent to the <literal>TIMING</literal> option of <command>EXPLAIN</command>.
The overhead of repeatedly reading the system clock can slow down The overhead of repeatedly reading the system clock can slow down
queries significantly on some systems, so it may be useful to set this queries significantly on some systems, so it may be useful to set this
parameter to off when only actual row counts, and not exact times, are parameter to off when only actual row counts, and not exact times, are
...@@ -136,7 +136,7 @@ LOAD 'auto_explain'; ...@@ -136,7 +136,7 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_triggers</varname> (<type>boolean</type>) <varname>auto_explain.log_triggers</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_triggers</> configuration parameter</primary> <primary><varname>auto_explain.log_triggers</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
...@@ -155,14 +155,14 @@ LOAD 'auto_explain'; ...@@ -155,14 +155,14 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_verbose</varname> (<type>boolean</type>) <varname>auto_explain.log_verbose</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_verbose</> configuration parameter</primary> <primary><varname>auto_explain.log_verbose</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
<varname>auto_explain.log_verbose</varname> controls whether verbose <varname>auto_explain.log_verbose</varname> controls whether verbose
details are printed when an execution plan is logged; it's details are printed when an execution plan is logged; it's
equivalent to the <literal>VERBOSE</> option of <command>EXPLAIN</>. equivalent to the <literal>VERBOSE</literal> option of <command>EXPLAIN</command>.
This parameter is off by default. This parameter is off by default.
Only superusers can change this setting. Only superusers can change this setting.
</para> </para>
...@@ -173,13 +173,13 @@ LOAD 'auto_explain'; ...@@ -173,13 +173,13 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_format</varname> (<type>enum</type>) <varname>auto_explain.log_format</varname> (<type>enum</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_format</> configuration parameter</primary> <primary><varname>auto_explain.log_format</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
<varname>auto_explain.log_format</varname> selects the <varname>auto_explain.log_format</varname> selects the
<command>EXPLAIN</> output format to be used. <command>EXPLAIN</command> output format to be used.
The allowed values are <literal>text</literal>, <literal>xml</literal>, The allowed values are <literal>text</literal>, <literal>xml</literal>,
<literal>json</literal>, and <literal>yaml</literal>. The default is text. <literal>json</literal>, and <literal>yaml</literal>. The default is text.
Only superusers can change this setting. Only superusers can change this setting.
...@@ -191,7 +191,7 @@ LOAD 'auto_explain'; ...@@ -191,7 +191,7 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.log_nested_statements</varname> (<type>boolean</type>) <varname>auto_explain.log_nested_statements</varname> (<type>boolean</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.log_nested_statements</> configuration parameter</primary> <primary><varname>auto_explain.log_nested_statements</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
...@@ -208,7 +208,7 @@ LOAD 'auto_explain'; ...@@ -208,7 +208,7 @@ LOAD 'auto_explain';
<term> <term>
<varname>auto_explain.sample_rate</varname> (<type>real</type>) <varname>auto_explain.sample_rate</varname> (<type>real</type>)
<indexterm> <indexterm>
<primary><varname>auto_explain.sample_rate</> configuration parameter</primary> <primary><varname>auto_explain.sample_rate</varname> configuration parameter</primary>
</indexterm> </indexterm>
</term> </term>
<listitem> <listitem>
...@@ -224,7 +224,7 @@ LOAD 'auto_explain'; ...@@ -224,7 +224,7 @@ LOAD 'auto_explain';
<para> <para>
In ordinary usage, these parameters are set In ordinary usage, these parameters are set
in <filename>postgresql.conf</>, although superusers can alter them in <filename>postgresql.conf</filename>, although superusers can alter them
on-the-fly within their own sessions. on-the-fly within their own sessions.
Typical usage might be: Typical usage might be:
</para> </para>
......
This diff is collapsed.
This diff is collapsed.
...@@ -171,7 +171,7 @@ ssimkovi@ag.or.at ...@@ -171,7 +171,7 @@ ssimkovi@ag.or.at
<abstract> <abstract>
<para> <para>
Discusses SQL history and syntax, and describes the addition of Discusses SQL history and syntax, and describes the addition of
<literal>INTERSECT</> and <literal>EXCEPT</> constructs into <literal>INTERSECT</literal> and <literal>EXCEPT</literal> constructs into
<productname>PostgreSQL</productname>. Prepared as a Master's <productname>PostgreSQL</productname>. Prepared as a Master's
Thesis with the support of O. Univ. Prof. Dr. Georg Gottlob and Thesis with the support of O. Univ. Prof. Dr. Georg Gottlob and
Univ. Ass. Mag. Katrin Seyr at Vienna University of Technology. Univ. Ass. Mag. Katrin Seyr at Vienna University of Technology.
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
input file used by <application>initdb</application> is created as input file used by <application>initdb</application> is created as
part of building and installing <productname>PostgreSQL</productname> part of building and installing <productname>PostgreSQL</productname>
by a program named <filename>genbki.pl</filename>, which reads some by a program named <filename>genbki.pl</filename>, which reads some
specially formatted C header files in the <filename>src/include/catalog/</> specially formatted C header files in the <filename>src/include/catalog/</filename>
directory of the source tree. The created <acronym>BKI</acronym> file directory of the source tree. The created <acronym>BKI</acronym> file
is called <filename>postgres.bki</filename> and is is called <filename>postgres.bki</filename> and is
normally installed in the normally installed in the
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term> <term>
<literal>create</> <literal>create</literal>
<replaceable class="parameter">tablename</replaceable> <replaceable class="parameter">tablename</replaceable>
<replaceable class="parameter">tableoid</replaceable> <replaceable class="parameter">tableoid</replaceable>
<optional><literal>bootstrap</></optional> <optional><literal>bootstrap</literal></optional>
<optional><literal>shared_relation</></optional> <optional><literal>shared_relation</literal></optional>
<optional><literal>without_oids</></optional> <optional><literal>without_oids</literal></optional>
<optional><literal>rowtype_oid</> <replaceable>oid</></optional> <optional><literal>rowtype_oid</literal> <replaceable>oid</replaceable></optional>
(<replaceable class="parameter">name1</replaceable> = (<replaceable class="parameter">name1</replaceable> =
<replaceable class="parameter">type1</replaceable> <replaceable class="parameter">type1</replaceable>
<optional>FORCE NOT NULL | FORCE NULL </optional> <optional>, <optional>FORCE NOT NULL | FORCE NULL </optional> <optional>,
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<para> <para>
The following column types are supported directly by The following column types are supported directly by
<filename>bootstrap.c</>: <type>bool</type>, <filename>bootstrap.c</filename>: <type>bool</type>,
<type>bytea</type>, <type>char</type> (1 byte), <type>bytea</type>, <type>char</type> (1 byte),
<type>name</type>, <type>int2</type>, <type>name</type>, <type>int2</type>,
<type>int4</type>, <type>regproc</type>, <type>regclass</type>, <type>int4</type>, <type>regproc</type>, <type>regclass</type>,
...@@ -104,31 +104,31 @@ ...@@ -104,31 +104,31 @@
<type>_oid</type> (array), <type>_char</type> (array), <type>_oid</type> (array), <type>_char</type> (array),
<type>_aclitem</type> (array). Although it is possible to create <type>_aclitem</type> (array). Although it is possible to create
tables containing columns of other types, this cannot be done until tables containing columns of other types, this cannot be done until
after <structname>pg_type</> has been created and filled with after <structname>pg_type</structname> has been created and filled with
appropriate entries. (That effectively means that only these appropriate entries. (That effectively means that only these
column types can be used in bootstrapped tables, but non-bootstrap column types can be used in bootstrapped tables, but non-bootstrap
catalogs can contain any built-in type.) catalogs can contain any built-in type.)
</para> </para>
<para> <para>
When <literal>bootstrap</> is specified, When <literal>bootstrap</literal> is specified,
the table will only be created on disk; nothing is entered into the table will only be created on disk; nothing is entered into
<structname>pg_class</structname>, <structname>pg_class</structname>,
<structname>pg_attribute</structname>, etc, for it. Thus the <structname>pg_attribute</structname>, etc, for it. Thus the
table will not be accessible by ordinary SQL operations until table will not be accessible by ordinary SQL operations until
such entries are made the hard way (with <literal>insert</> such entries are made the hard way (with <literal>insert</literal>
commands). This option is used for creating commands). This option is used for creating
<structname>pg_class</structname> etc themselves. <structname>pg_class</structname> etc themselves.
</para> </para>
<para> <para>
The table is created as shared if <literal>shared_relation</> is The table is created as shared if <literal>shared_relation</literal> is
specified. specified.
It will have OIDs unless <literal>without_oids</> is specified. It will have OIDs unless <literal>without_oids</literal> is specified.
The table's row type OID (<structname>pg_type</> OID) can optionally The table's row type OID (<structname>pg_type</structname> OID) can optionally
be specified via the <literal>rowtype_oid</> clause; if not specified, be specified via the <literal>rowtype_oid</literal> clause; if not specified,
an OID is automatically generated for it. (The <literal>rowtype_oid</> an OID is automatically generated for it. (The <literal>rowtype_oid</literal>
clause is useless if <literal>bootstrap</> is specified, but it can be clause is useless if <literal>bootstrap</literal> is specified, but it can be
provided anyway for documentation.) provided anyway for documentation.)
</para> </para>
</listitem> </listitem>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>open</> <replaceable class="parameter">tablename</replaceable> <literal>open</literal> <replaceable class="parameter">tablename</replaceable>
</term> </term>
<listitem> <listitem>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>close</> <optional><replaceable class="parameter">tablename</replaceable></optional> <literal>close</literal> <optional><replaceable class="parameter">tablename</replaceable></optional>
</term> </term>
<listitem> <listitem>
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>insert</> <optional><literal>OID =</> <replaceable class="parameter">oid_value</replaceable></optional> <literal>(</> <replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ... <literal>)</> <literal>insert</literal> <optional><literal>OID =</literal> <replaceable class="parameter">oid_value</replaceable></optional> <literal>(</literal> <replaceable class="parameter">value1</replaceable> <replaceable class="parameter">value2</replaceable> ... <literal>)</literal>
</term> </term>
<listitem> <listitem>
...@@ -188,14 +188,14 @@ ...@@ -188,14 +188,14 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>declare</> <optional><literal>unique</></optional> <literal>declare</literal> <optional><literal>unique</literal></optional>
<literal>index</> <replaceable class="parameter">indexname</replaceable> <literal>index</literal> <replaceable class="parameter">indexname</replaceable>
<replaceable class="parameter">indexoid</replaceable> <replaceable class="parameter">indexoid</replaceable>
<literal>on</> <replaceable class="parameter">tablename</replaceable> <literal>on</literal> <replaceable class="parameter">tablename</replaceable>
<literal>using</> <replaceable class="parameter">amname</replaceable> <literal>using</literal> <replaceable class="parameter">amname</replaceable>
<literal>(</> <replaceable class="parameter">opclass1</replaceable> <literal>(</literal> <replaceable class="parameter">opclass1</replaceable>
<replaceable class="parameter">name1</replaceable> <replaceable class="parameter">name1</replaceable>
<optional>, ...</optional> <literal>)</> <optional>, ...</optional> <literal>)</literal>
</term> </term>
<listitem> <listitem>
...@@ -220,10 +220,10 @@ ...@@ -220,10 +220,10 @@
<varlistentry> <varlistentry>
<term> <term>
<literal>declare toast</> <literal>declare toast</literal>
<replaceable class="parameter">toasttableoid</replaceable> <replaceable class="parameter">toasttableoid</replaceable>
<replaceable class="parameter">toastindexoid</replaceable> <replaceable class="parameter">toastindexoid</replaceable>
<literal>on</> <replaceable class="parameter">tablename</replaceable> <literal>on</literal> <replaceable class="parameter">tablename</replaceable>
</term> </term>
<listitem> <listitem>
...@@ -234,14 +234,14 @@ ...@@ -234,14 +234,14 @@
<replaceable class="parameter">toasttableoid</replaceable> <replaceable class="parameter">toasttableoid</replaceable>
and its index is assigned OID and its index is assigned OID
<replaceable class="parameter">toastindexoid</replaceable>. <replaceable class="parameter">toastindexoid</replaceable>.
As with <literal>declare index</>, filling of the index As with <literal>declare index</literal>, filling of the index
is postponed. is postponed.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>build indices</></term> <term><literal>build indices</literal></term>
<listitem> <listitem>
<para> <para>
...@@ -257,17 +257,17 @@ ...@@ -257,17 +257,17 @@
<title>Structure of the Bootstrap <acronym>BKI</acronym> File</title> <title>Structure of the Bootstrap <acronym>BKI</acronym> File</title>
<para> <para>
The <literal>open</> command cannot be used until the tables it uses The <literal>open</literal> command cannot be used until the tables it uses
exist and have entries for the table that is to be opened. exist and have entries for the table that is to be opened.
(These minimum tables are <structname>pg_class</>, (These minimum tables are <structname>pg_class</structname>,
<structname>pg_attribute</>, <structname>pg_proc</>, and <structname>pg_attribute</structname>, <structname>pg_proc</structname>, and
<structname>pg_type</>.) To allow those tables themselves to be filled, <structname>pg_type</structname>.) To allow those tables themselves to be filled,
<literal>create</> with the <literal>bootstrap</> option implicitly opens <literal>create</literal> with the <literal>bootstrap</literal> option implicitly opens
the created table for data insertion. the created table for data insertion.
</para> </para>
<para> <para>
Also, the <literal>declare index</> and <literal>declare toast</> Also, the <literal>declare index</literal> and <literal>declare toast</literal>
commands cannot be used until the system catalogs they need have been commands cannot be used until the system catalogs they need have been
created and filled in. created and filled in.
</para> </para>
...@@ -278,17 +278,17 @@ ...@@ -278,17 +278,17 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para> <para>
<literal>create bootstrap</> one of the critical tables <literal>create bootstrap</literal> one of the critical tables
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>insert</> data describing at least the critical tables <literal>insert</literal> data describing at least the critical tables
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>close</> <literal>close</literal>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -298,22 +298,22 @@ ...@@ -298,22 +298,22 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>create</> (without <literal>bootstrap</>) a noncritical table <literal>create</literal> (without <literal>bootstrap</literal>) a noncritical table
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>open</> <literal>open</literal>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>insert</> desired data <literal>insert</literal> desired data
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>close</> <literal>close</literal>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>build indices</> <literal>build indices</literal>
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</indexterm> </indexterm>
<para> <para>
<literal>bloom</> provides an index access method based on <literal>bloom</literal> provides an index access method based on
<ulink url="http://en.wikipedia.org/wiki/Bloom_filter">Bloom filters</ulink>. <ulink url="http://en.wikipedia.org/wiki/Bloom_filter">Bloom filters</ulink>.
</para> </para>
...@@ -42,29 +42,29 @@ ...@@ -42,29 +42,29 @@
<title>Parameters</title> <title>Parameters</title>
<para> <para>
A <literal>bloom</> index accepts the following parameters in its A <literal>bloom</literal> index accepts the following parameters in its
<literal>WITH</> clause: <literal>WITH</literal> clause:
</para> </para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><literal>length</></term> <term><literal>length</literal></term>
<listitem> <listitem>
<para> <para>
Length of each signature (index entry) in bits. The default Length of each signature (index entry) in bits. The default
is <literal>80</> bits and maximum is <literal>4096</>. is <literal>80</literal> bits and maximum is <literal>4096</literal>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><literal>col1 &mdash; col32</></term> <term><literal>col1 &mdash; col32</literal></term>
<listitem> <listitem>
<para> <para>
Number of bits generated for each index column. Each parameter's name Number of bits generated for each index column. Each parameter's name
refers to the number of the index column that it controls. The default refers to the number of the index column that it controls. The default
is <literal>2</> bits and maximum is <literal>4095</>. Parameters for is <literal>2</literal> bits and maximum is <literal>4095</literal>. Parameters for
index columns not actually used are ignored. index columns not actually used are ignored.
</para> </para>
</listitem> </listitem>
...@@ -87,8 +87,8 @@ CREATE INDEX bloomidx ON tbloom USING bloom (i1,i2,i3) ...@@ -87,8 +87,8 @@ CREATE INDEX bloomidx ON tbloom USING bloom (i1,i2,i3)
<para> <para>
The index is created with a signature length of 80 bits, with attributes The index is created with a signature length of 80 bits, with attributes
i1 and i2 mapped to 2 bits, and attribute i3 mapped to 4 bits. We could i1 and i2 mapped to 2 bits, and attribute i3 mapped to 4 bits. We could
have omitted the <literal>length</>, <literal>col1</>, have omitted the <literal>length</literal>, <literal>col1</literal>,
and <literal>col2</> specifications since those have the default values. and <literal>col2</literal> specifications since those have the default values.
</para> </para>
<para> <para>
...@@ -175,7 +175,7 @@ CREATE INDEX ...@@ -175,7 +175,7 @@ CREATE INDEX
Note the relatively large number of false positives: 2439 rows were Note the relatively large number of false positives: 2439 rows were
selected to be visited in the heap, but none actually matched the selected to be visited in the heap, but none actually matched the
query. We could reduce that by specifying a larger signature length. query. We could reduce that by specifying a larger signature length.
In this example, creating the index with <literal>length=200</> In this example, creating the index with <literal>length=200</literal>
reduced the number of false positives to 55; but it doubled the index size reduced the number of false positives to 55; but it doubled the index size
(to 306 MB) and ended up being slower for this query (125 ms overall). (to 306 MB) and ended up being slower for this query (125 ms overall).
</para> </para>
...@@ -213,7 +213,7 @@ CREATE INDEX ...@@ -213,7 +213,7 @@ CREATE INDEX
<para> <para>
An operator class for bloom indexes requires only a hash function for the An operator class for bloom indexes requires only a hash function for the
indexed data type and an equality operator for searching. This example indexed data type and an equality operator for searching. This example
shows the operator class definition for the <type>text</> data type: shows the operator class definition for the <type>text</type> data type:
</para> </para>
<programlisting> <programlisting>
...@@ -230,7 +230,7 @@ DEFAULT FOR TYPE text USING bloom AS ...@@ -230,7 +230,7 @@ DEFAULT FOR TYPE text USING bloom AS
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
Only operator classes for <type>int4</> and <type>text</> are Only operator classes for <type>int4</type> and <type>text</type> are
included with the module. included with the module.
</para> </para>
</listitem> </listitem>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<acronym>BRIN</acronym> is designed for handling very large tables <acronym>BRIN</acronym> is designed for handling very large tables
in which certain columns have some natural correlation with their in which certain columns have some natural correlation with their
physical location within the table. physical location within the table.
A <firstterm>block range</> is a group of pages that are physically A <firstterm>block range</firstterm> is a group of pages that are physically
adjacent in the table; for each block range, some summary info is stored adjacent in the table; for each block range, some summary info is stored
by the index. by the index.
For example, a table storing a store's sale orders might have For example, a table storing a store's sale orders might have
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<para> <para>
<acronym>BRIN</acronym> indexes can satisfy queries via regular bitmap <acronym>BRIN</acronym> indexes can satisfy queries via regular bitmap
index scans, and will return all tuples in all pages within each range if index scans, and will return all tuples in all pages within each range if
the summary info stored by the index is <firstterm>consistent</> with the the summary info stored by the index is <firstterm>consistent</firstterm> with the
query conditions. query conditions.
The query executor is in charge of rechecking these tuples and discarding The query executor is in charge of rechecking these tuples and discarding
those that do not match the query conditions &mdash; in other words, these those that do not match the query conditions &mdash; in other words, these
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
<para> <para>
The size of the block range is determined at index creation time by The size of the block range is determined at index creation time by
the <literal>pages_per_range</> storage parameter. The number of index the <literal>pages_per_range</literal> storage parameter. The number of index
entries will be equal to the size of the relation in pages divided by entries will be equal to the size of the relation in pages divided by
the selected value for <literal>pages_per_range</>. Therefore, the smaller the selected value for <literal>pages_per_range</literal>. Therefore, the smaller
the number, the larger the index becomes (because of the need to the number, the larger the index becomes (because of the need to
store more index entries), but at the same time the summary data stored can store more index entries), but at the same time the summary data stored can
be more precise and more data blocks can be skipped during an index scan. be more precise and more data blocks can be skipped during an index scan.
...@@ -99,9 +99,9 @@ ...@@ -99,9 +99,9 @@
</para> </para>
<para> <para>
The <firstterm>minmax</> The <firstterm>minmax</firstterm>
operator classes store the minimum and the maximum values appearing operator classes store the minimum and the maximum values appearing
in the indexed column within the range. The <firstterm>inclusion</> in the indexed column within the range. The <firstterm>inclusion</firstterm>
operator classes store a value which includes the values in the indexed operator classes store a value which includes the values in the indexed
column within the range. column within the range.
</para> </para>
...@@ -162,21 +162,21 @@ ...@@ -162,21 +162,21 @@
</entry> </entry>
</row> </row>
<row> <row>
<entry><literal>box_inclusion_ops</></entry> <entry><literal>box_inclusion_ops</literal></entry>
<entry><type>box</type></entry> <entry><type>box</type></entry>
<entry> <entry>
<literal>&lt;&lt;</> <literal>&lt;&lt;</literal>
<literal>&amp;&lt;</> <literal>&amp;&lt;</literal>
<literal>&amp;&amp;</> <literal>&amp;&amp;</literal>
<literal>&amp;&gt;</> <literal>&amp;&gt;</literal>
<literal>&gt;&gt;</> <literal>&gt;&gt;</literal>
<literal>~=</> <literal>~=</literal>
<literal>@&gt;</> <literal>@&gt;</literal>
<literal>&lt;@</> <literal>&lt;@</literal>
<literal>&amp;&lt;|</> <literal>&amp;&lt;|</literal>
<literal>&lt;&lt;|</> <literal>&lt;&lt;|</literal>
<literal>|&gt;&gt;</literal> <literal>|&gt;&gt;</literal>
<literal>|&amp;&gt;</> <literal>|&amp;&gt;</literal>
</entry> </entry>
</row> </row>
<row> <row>
...@@ -249,11 +249,11 @@ ...@@ -249,11 +249,11 @@
<entry><literal>network_inclusion_ops</literal></entry> <entry><literal>network_inclusion_ops</literal></entry>
<entry><type>inet</type></entry> <entry><type>inet</type></entry>
<entry> <entry>
<literal>&amp;&amp;</> <literal>&amp;&amp;</literal>
<literal>&gt;&gt;=</> <literal>&gt;&gt;=</literal>
<literal>&lt;&lt;=</literal> <literal>&lt;&lt;=</literal>
<literal>=</literal> <literal>=</literal>
<literal>&gt;&gt;</> <literal>&gt;&gt;</literal>
<literal>&lt;&lt;</literal> <literal>&lt;&lt;</literal>
</entry> </entry>
</row> </row>
...@@ -346,18 +346,18 @@ ...@@ -346,18 +346,18 @@
</entry> </entry>
</row> </row>
<row> <row>
<entry><literal>range_inclusion_ops</></entry> <entry><literal>range_inclusion_ops</literal></entry>
<entry><type>any range type</type></entry> <entry><type>any range type</type></entry>
<entry> <entry>
<literal>&lt;&lt;</> <literal>&lt;&lt;</literal>
<literal>&amp;&lt;</> <literal>&amp;&lt;</literal>
<literal>&amp;&amp;</> <literal>&amp;&amp;</literal>
<literal>&amp;&gt;</> <literal>&amp;&gt;</literal>
<literal>&gt;&gt;</> <literal>&gt;&gt;</literal>
<literal>@&gt;</> <literal>@&gt;</literal>
<literal>&lt;@</> <literal>&lt;@</literal>
<literal>-|-</> <literal>-|-</literal>
<literal>=</> <literal>=</literal>
<literal>&lt;</literal> <literal>&lt;</literal>
<literal>&lt;=</literal> <literal>&lt;=</literal>
<literal>=</literal> <literal>=</literal>
...@@ -505,11 +505,11 @@ ...@@ -505,11 +505,11 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><function>BrinOpcInfo *opcInfo(Oid type_oid)</></term> <term><function>BrinOpcInfo *opcInfo(Oid type_oid)</function></term>
<listitem> <listitem>
<para> <para>
Returns internal information about the indexed columns' summary data. Returns internal information about the indexed columns' summary data.
The return value must point to a palloc'd <structname>BrinOpcInfo</>, The return value must point to a palloc'd <structname>BrinOpcInfo</structname>,
which has this definition: which has this definition:
<programlisting> <programlisting>
typedef struct BrinOpcInfo typedef struct BrinOpcInfo
...@@ -524,7 +524,7 @@ typedef struct BrinOpcInfo ...@@ -524,7 +524,7 @@ typedef struct BrinOpcInfo
TypeCacheEntry *oi_typcache[FLEXIBLE_ARRAY_MEMBER]; TypeCacheEntry *oi_typcache[FLEXIBLE_ARRAY_MEMBER];
} BrinOpcInfo; } BrinOpcInfo;
</programlisting> </programlisting>
<structname>BrinOpcInfo</>.<structfield>oi_opaque</> can be used by the <structname>BrinOpcInfo</structname>.<structfield>oi_opaque</structfield> can be used by the
operator class routines to pass information between support procedures operator class routines to pass information between support procedures
during an index scan. during an index scan.
</para> </para>
...@@ -797,8 +797,8 @@ typedef struct BrinOpcInfo ...@@ -797,8 +797,8 @@ typedef struct BrinOpcInfo
It should accept two arguments with the same data type as the operator class, It should accept two arguments with the same data type as the operator class,
and return the union of them. The inclusion operator class can store union and return the union of them. The inclusion operator class can store union
values with different data types if it is defined with the values with different data types if it is defined with the
<literal>STORAGE</> parameter. The return value of the union <literal>STORAGE</literal> parameter. The return value of the union
function should match the <literal>STORAGE</> data type. function should match the <literal>STORAGE</literal> data type.
</para> </para>
<para> <para>
...@@ -823,11 +823,11 @@ typedef struct BrinOpcInfo ...@@ -823,11 +823,11 @@ typedef struct BrinOpcInfo
on another operator strategy as shown in on another operator strategy as shown in
<xref linkend="brin-extensibility-inclusion-table">, or the same <xref linkend="brin-extensibility-inclusion-table">, or the same
operator strategy as themselves. They require the dependency operator strategy as themselves. They require the dependency
operator to be defined with the <literal>STORAGE</> data type as the operator to be defined with the <literal>STORAGE</literal> data type as the
left-hand-side argument and the other supported data type to be the left-hand-side argument and the other supported data type to be the
right-hand-side argument of the supported operator. See right-hand-side argument of the supported operator. See
<literal>float4_minmax_ops</> as an example of minmax, and <literal>float4_minmax_ops</literal> as an example of minmax, and
<literal>box_inclusion_ops</> as an example of inclusion. <literal>box_inclusion_ops</literal> as an example of inclusion.
</para> </para>
</sect1> </sect1>
</chapter> </chapter>
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
</indexterm> </indexterm>
<para> <para>
<filename>btree_gin</> provides sample GIN operator classes that <filename>btree_gin</filename> provides sample GIN operator classes that
implement B-tree equivalent behavior for the data types implement B-tree equivalent behavior for the data types
<type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>,
<type>float8</>, <type>timestamp with time zone</>, <type>float8</type>, <type>timestamp with time zone</type>,
<type>timestamp without time zone</>, <type>time with time zone</>, <type>timestamp without time zone</type>, <type>time with time zone</type>,
<type>time without time zone</>, <type>date</>, <type>interval</>, <type>time without time zone</type>, <type>date</type>, <type>interval</type>,
<type>oid</>, <type>money</>, <type>"char"</>, <type>oid</type>, <type>money</type>, <type>"char"</type>,
<type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>, <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>,
<type>varbit</>, <type>macaddr</>, <type>macaddr8</>, <type>inet</>, <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>,
<type>cidr</>, and all <type>enum</> types. <type>cidr</type>, and all <type>enum</type> types.
</para> </para>
<para> <para>
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
</indexterm> </indexterm>
<para> <para>
<filename>btree_gist</> provides GiST index operator classes that <filename>btree_gist</filename> provides GiST index operator classes that
implement B-tree equivalent behavior for the data types implement B-tree equivalent behavior for the data types
<type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>,
<type>float8</>, <type>numeric</>, <type>timestamp with time zone</>, <type>float8</type>, <type>numeric</type>, <type>timestamp with time zone</type>,
<type>timestamp without time zone</>, <type>time with time zone</>, <type>timestamp without time zone</type>, <type>time with time zone</type>,
<type>time without time zone</>, <type>date</>, <type>interval</>, <type>time without time zone</type>, <type>date</type>, <type>interval</type>,
<type>oid</>, <type>money</>, <type>char</>, <type>oid</type>, <type>money</type>, <type>char</type>,
<type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>, <type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>,
<type>varbit</>, <type>macaddr</>, <type>macaddr8</>, <type>inet</>, <type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>,
<type>cidr</>, <type>uuid</>, and all <type>enum</> types. <type>cidr</type>, <type>uuid</type>, and all <type>enum</type> types.
</para> </para>
<para> <para>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</para> </para>
<para> <para>
In addition to the typical B-tree search operators, <filename>btree_gist</> In addition to the typical B-tree search operators, <filename>btree_gist</filename>
also provides index support for <literal>&lt;&gt;</literal> (<quote>not also provides index support for <literal>&lt;&gt;</literal> (<quote>not
equals</quote>). This may be useful in combination with an equals</quote>). This may be useful in combination with an
<link linkend="SQL-CREATETABLE-EXCLUDE">exclusion constraint</link>, <link linkend="SQL-CREATETABLE-EXCLUDE">exclusion constraint</link>,
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
<para> <para>
Also, for data types for which there is a natural distance metric, Also, for data types for which there is a natural distance metric,
<filename>btree_gist</> defines a distance operator <literal>&lt;-&gt;</>, <filename>btree_gist</filename> defines a distance operator <literal>&lt;-&gt;</literal>,
and provides GiST index support for nearest-neighbor searches using and provides GiST index support for nearest-neighbor searches using
this operator. Distance operators are provided for this operator. Distance operators are provided for
<type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>, <type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>,
<type>float8</>, <type>timestamp with time zone</>, <type>float8</type>, <type>timestamp with time zone</type>,
<type>timestamp without time zone</>, <type>timestamp without time zone</type>,
<type>time without time zone</>, <type>date</>, <type>interval</>, <type>time without time zone</type>, <type>date</type>, <type>interval</type>,
<type>oid</>, and <type>money</>. <type>oid</type>, and <type>money</type>.
</para> </para>
<sect2> <sect2>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<para> <para>
This appendix and the next one contain information regarding the modules that This appendix and the next one contain information regarding the modules that
can be found in the <literal>contrib</literal> directory of the can be found in the <literal>contrib</literal> directory of the
<productname>PostgreSQL</> distribution. <productname>PostgreSQL</productname> distribution.
These include porting tools, analysis utilities, These include porting tools, analysis utilities,
and plug-in features that are not part of the core PostgreSQL system, and plug-in features that are not part of the core PostgreSQL system,
mainly because they address a limited audience or are too experimental mainly because they address a limited audience or are too experimental
...@@ -41,54 +41,54 @@ ...@@ -41,54 +41,54 @@
<screen> <screen>
<userinput>make installcheck</userinput> <userinput>make installcheck</userinput>
</screen> </screen>
once you have a <productname>PostgreSQL</> server running. once you have a <productname>PostgreSQL</productname> server running.
</para> </para>
<para> <para>
If you are using a pre-packaged version of <productname>PostgreSQL</>, If you are using a pre-packaged version of <productname>PostgreSQL</productname>,
these modules are typically made available as a separate subpackage, these modules are typically made available as a separate subpackage,
such as <literal>postgresql-contrib</>. such as <literal>postgresql-contrib</literal>.
</para> </para>
<para> <para>
Many modules supply new user-defined functions, operators, or types. Many modules supply new user-defined functions, operators, or types.
To make use of one of these modules, after you have installed the code To make use of one of these modules, after you have installed the code
you need to register the new SQL objects in the database system. you need to register the new SQL objects in the database system.
In <productname>PostgreSQL</> 9.1 and later, this is done by executing In <productname>PostgreSQL</productname> 9.1 and later, this is done by executing
a <xref linkend="sql-createextension"> command. In a fresh database, a <xref linkend="sql-createextension"> command. In a fresh database,
you can simply do you can simply do
<programlisting> <programlisting>
CREATE EXTENSION <replaceable>module_name</>; CREATE EXTENSION <replaceable>module_name</replaceable>;
</programlisting> </programlisting>
This command must be run by a database superuser. This registers the This command must be run by a database superuser. This registers the
new SQL objects in the current database only, so you need to run this new SQL objects in the current database only, so you need to run this
command in each database that you want command in each database that you want
the module's facilities to be available in. Alternatively, run it in the module's facilities to be available in. Alternatively, run it in
database <literal>template1</> so that the extension will be copied into database <literal>template1</literal> so that the extension will be copied into
subsequently-created databases by default. subsequently-created databases by default.
</para> </para>
<para> <para>
Many modules allow you to install their objects in a schema of your Many modules allow you to install their objects in a schema of your
choice. To do that, add <literal>SCHEMA choice. To do that, add <literal>SCHEMA
<replaceable>schema_name</></literal> to the <command>CREATE EXTENSION</> <replaceable>schema_name</replaceable></literal> to the <command>CREATE EXTENSION</command>
command. By default, the objects will be placed in your current creation command. By default, the objects will be placed in your current creation
target schema, typically <literal>public</>. target schema, typically <literal>public</literal>.
</para> </para>
<para> <para>
If your database was brought forward by dump and reload from a pre-9.1 If your database was brought forward by dump and reload from a pre-9.1
version of <productname>PostgreSQL</>, and you had been using the pre-9.1 version of <productname>PostgreSQL</productname>, and you had been using the pre-9.1
version of the module in it, you should instead do version of the module in it, you should instead do
<programlisting> <programlisting>
CREATE EXTENSION <replaceable>module_name</> FROM unpackaged; CREATE EXTENSION <replaceable>module_name</replaceable> FROM unpackaged;
</programlisting> </programlisting>
This will update the pre-9.1 objects of the module into a proper This will update the pre-9.1 objects of the module into a proper
<firstterm>extension</> object. Future updates to the module will be <firstterm>extension</firstterm> object. Future updates to the module will be
managed by <xref linkend="sql-alterextension">. managed by <xref linkend="sql-alterextension">.
For more information about extension updates, see For more information about extension updates, see
<xref linkend="extend-extensions">. <xref linkend="extend-extensions">.
...@@ -163,7 +163,7 @@ pages. ...@@ -163,7 +163,7 @@ pages.
<para> <para>
This appendix and the previous one contain information regarding the modules that This appendix and the previous one contain information regarding the modules that
can be found in the <literal>contrib</literal> directory of the can be found in the <literal>contrib</literal> directory of the
<productname>PostgreSQL</> distribution. See <xref linkend="contrib"> for <productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"> for
more information about the <literal>contrib</literal> section in general and more information about the <literal>contrib</literal> section in general and
server extensions and plug-ins found in <literal>contrib</literal> server extensions and plug-ins found in <literal>contrib</literal>
specifically. specifically.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
C, they must be compiled and linked in a special way to produce a C, they must be compiled and linked in a special way to produce a
file that can be dynamically loaded by the server. To be precise, a file that can be dynamically loaded by the server. To be precise, a
<firstterm>shared library</firstterm> needs to be <firstterm>shared library</firstterm> needs to be
created.<indexterm><primary>shared library</></indexterm> created.<indexterm><primary>shared library</primary></indexterm>
</para> </para>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
executables: first the source files are compiled into object files, executables: first the source files are compiled into object files,
then the object files are linked together. The object files need to then the object files are linked together. The object files need to
be created as <firstterm>position-independent code</firstterm> be created as <firstterm>position-independent code</firstterm>
(<acronym>PIC</acronym>),<indexterm><primary>PIC</></> which (<acronym>PIC</acronym>),<indexterm><primary>PIC</primary></indexterm> which
conceptually means that they can be placed at an arbitrary location conceptually means that they can be placed at an arbitrary location
in memory when they are loaded by the executable. (Object files in memory when they are loaded by the executable. (Object files
intended for executables are usually not compiled that way.) The intended for executables are usually not compiled that way.) The
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">FreeBSD</> <systemitem class="osname">FreeBSD</systemitem>
<indexterm><primary>FreeBSD</><secondary>shared library</></> <indexterm><primary>FreeBSD</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -70,15 +70,15 @@ gcc -fPIC -c foo.c ...@@ -70,15 +70,15 @@ gcc -fPIC -c foo.c
gcc -shared -o foo.so foo.o gcc -shared -o foo.so foo.o
</programlisting> </programlisting>
This is applicable as of version 3.0 of This is applicable as of version 3.0 of
<systemitem class="osname">FreeBSD</>. <systemitem class="osname">FreeBSD</systemitem>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">HP-UX</> <systemitem class="osname">HP-UX</systemitem>
<indexterm><primary>HP-UX</><secondary>shared library</></> <indexterm><primary>HP-UX</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -97,7 +97,7 @@ gcc -fPIC -c foo.c ...@@ -97,7 +97,7 @@ gcc -fPIC -c foo.c
<programlisting> <programlisting>
ld -b -o foo.sl foo.o ld -b -o foo.sl foo.o
</programlisting> </programlisting>
<systemitem class="osname">HP-UX</> uses the extension <systemitem class="osname">HP-UX</systemitem> uses the extension
<filename>.sl</filename> for shared libraries, unlike most other <filename>.sl</filename> for shared libraries, unlike most other
systems. systems.
</para> </para>
...@@ -106,8 +106,8 @@ ld -b -o foo.sl foo.o ...@@ -106,8 +106,8 @@ ld -b -o foo.sl foo.o
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">Linux</> <systemitem class="osname">Linux</systemitem>
<indexterm><primary>Linux</><secondary>shared library</></> <indexterm><primary>Linux</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -125,8 +125,8 @@ cc -shared -o foo.so foo.o ...@@ -125,8 +125,8 @@ cc -shared -o foo.so foo.o
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">macOS</> <systemitem class="osname">macOS</systemitem>
<indexterm><primary>macOS</><secondary>shared library</></> <indexterm><primary>macOS</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -141,8 +141,8 @@ cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o ...@@ -141,8 +141,8 @@ cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">NetBSD</> <systemitem class="osname">NetBSD</systemitem>
<indexterm><primary>NetBSD</><secondary>shared library</></> <indexterm><primary>NetBSD</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -161,8 +161,8 @@ gcc -shared -o foo.so foo.o ...@@ -161,8 +161,8 @@ gcc -shared -o foo.so foo.o
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">OpenBSD</> <systemitem class="osname">OpenBSD</systemitem>
<indexterm><primary>OpenBSD</><secondary>shared library</></> <indexterm><primary>OpenBSD</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
...@@ -179,17 +179,17 @@ ld -Bshareable -o foo.so foo.o ...@@ -179,17 +179,17 @@ ld -Bshareable -o foo.so foo.o
<varlistentry> <varlistentry>
<term> <term>
<systemitem class="osname">Solaris</> <systemitem class="osname">Solaris</systemitem>
<indexterm><primary>Solaris</><secondary>shared library</></> <indexterm><primary>Solaris</primary><secondary>shared library</secondary></indexterm>
</term> </term>
<listitem> <listitem>
<para> <para>
The compiler flag to create <acronym>PIC</acronym> is The compiler flag to create <acronym>PIC</acronym> is
<option>-KPIC</option> with the Sun compiler and <option>-KPIC</option> with the Sun compiler and
<option>-fPIC</option> with <application>GCC</>. To <option>-fPIC</option> with <application>GCC</application>. To
link shared libraries, the compiler option is link shared libraries, the compiler option is
<option>-G</option> with either compiler or alternatively <option>-G</option> with either compiler or alternatively
<option>-shared</option> with <application>GCC</>. <option>-shared</option> with <application>GCC</application>.
<programlisting> <programlisting>
cc -KPIC -c foo.c cc -KPIC -c foo.c
cc -G -o foo.so foo.o cc -G -o foo.so foo.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -449,7 +449,7 @@ checking for fop... fop ...@@ -449,7 +449,7 @@ checking for fop... fop
<para> <para>
To produce HTML documentation with the stylesheet used on <ulink To produce HTML documentation with the stylesheet used on <ulink
url="https://www.postgresql.org/docs/current">postgresql.org</> instead of the url="https://www.postgresql.org/docs/current">postgresql.org</ulink> instead of the
default simple style use: default simple style use:
<screen> <screen>
<prompt>doc/src/sgml$ </prompt><userinput>make STYLE=website html</userinput> <prompt>doc/src/sgml$ </prompt><userinput>make STYLE=website html</userinput>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -30,12 +30,12 @@ while (<$errcodes>) ...@@ -30,12 +30,12 @@ while (<$errcodes>)
s/-/&mdash;/; s/-/&mdash;/;
# Wrap PostgreSQL in <productname/> # Wrap PostgreSQL in <productname/>
s/PostgreSQL/<productname>PostgreSQL<\/>/g; s/PostgreSQL/<productname>PostgreSQL<\/productname>/g;
print "\n\n"; print "\n\n";
print "<row>\n"; print "<row>\n";
print "<entry spanname=\"span12\">"; print "<entry spanname=\"span12\">";
print "<emphasis role=\"bold\">$_</></entry>\n"; print "<emphasis role=\"bold\">$_</emphasis></entry>\n";
print "</row>\n"; print "</row>\n";
next; next;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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