Commit bc499687 authored by Peter Eisentraut's avatar Peter Eisentraut

Add more appropriate markup.

parent 7233aae5
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.21 2002/08/05 19:43:30 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/array.sgml,v 1.22 2002/09/21 18:32:52 petere Exp $ -->
<sect1 id="arrays"> <sect1 id="arrays">
<title>Arrays</title> <title>Arrays</title>
...@@ -251,8 +251,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000; ...@@ -251,8 +251,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
<note> <note>
<para> <para>
A limitation of the present array implementation is that individual A limitation of the present array implementation is that individual
elements of an array cannot be SQL NULLs. The entire array can be set elements of an array cannot be SQL null values. The entire array can be set
to NULL, but you can't have an array with some elements NULL and some to null, but you can't have an array with some elements null and some
not. Fixing this is on the to-do list. not. Fixing this is on the to-do list.
</para> </para>
</note> </note>
...@@ -267,7 +267,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000; ...@@ -267,7 +267,7 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
around the array value plus delimiter characters between adjacent items. around the array value plus delimiter characters between adjacent items.
The delimiter character is usually a comma (<literal>,</>) but can be The delimiter character is usually a comma (<literal>,</>) but can be
something else: it is determined by the <literal>typdelim</> setting something else: it is determined by the <literal>typdelim</> setting
for the array's element type. (Among the standard datatypes provided for the array's element type. (Among the standard data types provided
in the <productname>PostgreSQL</productname> distribution, type in the <productname>PostgreSQL</productname> distribution, type
<literal>box</> uses a semicolon (<literal>;</>) but all the others <literal>box</> uses a semicolon (<literal>;</>) but all the others
use comma.) In a multidimensional array, each dimension (row, plane, use comma.) In a multidimensional array, each dimension (row, plane,
...@@ -300,8 +300,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000; ...@@ -300,8 +300,8 @@ SELECT * FROM sal_emp WHERE pay_by_quarter **= 10000;
if they are empty strings or contain curly braces, delimiter characters, if they are empty strings or contain curly braces, delimiter characters,
double quotes, backslashes, or white space. Double quotes and backslashes double quotes, backslashes, or white space. Double quotes and backslashes
embedded in element values will be backslash-escaped. For numeric embedded in element values will be backslash-escaped. For numeric
datatypes it is safe to assume that double quotes will never appear, but data types it is safe to assume that double quotes will never appear, but
for textual datatypes one should be prepared to cope with either presence for textual data types one should be prepared to cope with either presence
or absence of quotes. (This is a change in behavior from pre-7.2 or absence of quotes. (This is a change in behavior from pre-7.2
<productname>PostgreSQL</productname> releases.) <productname>PostgreSQL</productname> releases.)
</para> </para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.28 2002/09/18 20:09:31 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.29 2002/09/21 18:32:52 petere Exp $ -->
<chapter id="charset"> <chapter id="charset">
<title>Localization</> <title>Localization</>
...@@ -405,27 +405,27 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -405,27 +405,27 @@ perl: warning: Falling back to the standard locale ("C").
</row> </row>
<row> <row>
<entry><literal>LATIN1</literal></entry> <entry><literal>LATIN1</literal></entry>
<entry>ISO 8859-1 ECMA-94 Latin Alphabet No.1</entry> <entry>ISO 8859-1 <acronym>ECMA</>-94 Latin Alphabet No.1</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal></entry>
<entry>ISO 8859-2 ECMA-94 Latin Alphabet No.2</entry> <entry>ISO 8859-2 <acronym>ECMA</>-94 Latin Alphabet No.2</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN3</literal></entry> <entry><literal>LATIN3</literal></entry>
<entry>ISO 8859-3 ECMA-94 Latin Alphabet No.3</entry> <entry>ISO 8859-3 <acronym>ECMA</>-94 Latin Alphabet No.3</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN4</literal></entry> <entry><literal>LATIN4</literal></entry>
<entry>ISO 8859-4 ECMA-94 Latin Alphabet No.4</entry> <entry>ISO 8859-4 <acronym>ECMA</>-94 Latin Alphabet No.4</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN5</literal></entry> <entry><literal>LATIN5</literal></entry>
<entry>ISO 8859-9 ECMA-128 Latin Alphabet No.5</entry> <entry>ISO 8859-9 <acronym>ECMA</>-128 Latin Alphabet No.5</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN6</literal></entry> <entry><literal>LATIN6</literal></entry>
<entry>ISO 8859-10 ECMA-144 Latin Alphabet No.6</entry> <entry>ISO 8859-10 <acronym>ECMA</>-144 Latin Alphabet No.6</entry>
</row> </row>
<row> <row>
<entry><literal>LATIN7</literal></entry> <entry><literal>LATIN7</literal></entry>
...@@ -441,23 +441,23 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -441,23 +441,23 @@ perl: warning: Falling back to the standard locale ("C").
</row> </row>
<row> <row>
<entry><literal>LATIN10</literal></entry> <entry><literal>LATIN10</literal></entry>
<entry>ISO 8859-16 ASRO SR 14111 Latin Alphabet No.10</entry> <entry>ISO 8859-16 <acronym>ASRO</> SR 14111 Latin Alphabet No.10</entry>
</row> </row>
<row> <row>
<entry><literal>ISO-8859-5</literal></entry> <entry><literal>ISO-8859-5</literal></entry>
<entry>ECMA-113 Latin/Cyrillic</entry> <entry><acronym>ECMA</>-113 Latin/Cyrillic</entry>
</row> </row>
<row> <row>
<entry><literal>ISO-8859-6</literal></entry> <entry><literal>ISO-8859-6</literal></entry>
<entry>ECMA-114 Latin/Arabic</entry> <entry><acronym>ECMA</>-114 Latin/Arabic</entry>
</row> </row>
<row> <row>
<entry><literal>ISO-8859-7</literal></entry> <entry><literal>ISO-8859-7</literal></entry>
<entry>ECMA-118 Latin/Greek</entry> <entry><acronym>ECMA</>-118 Latin/Greek</entry>
</row> </row>
<row> <row>
<entry><literal>ISO-8859-8</literal></entry> <entry><literal>ISO-8859-8</literal></entry>
<entry>ECMA-121 Latin/Hebrew</entry> <entry><acronym>ECMA</>-121 Latin/Hebrew</entry>
</row> </row>
<row> <row>
<entry><literal>KOI8</literal></entry> <entry><literal>KOI8</literal></entry>
...@@ -477,7 +477,7 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -477,7 +477,7 @@ perl: warning: Falling back to the standard locale ("C").
</row> </row>
<row> <row>
<entry><literal>TCVN</literal></entry> <entry><literal>TCVN</literal></entry>
<entry>Vietnamese TCVN-5712(Windows CP1258)</entry> <entry>Vietnamese <acronym>TCVN</>-5712 (Windows CP1258)</entry>
</row> </row>
<row> <row>
<entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal></entry>
...@@ -500,7 +500,7 @@ perl: warning: Falling back to the standard locale ("C"). ...@@ -500,7 +500,7 @@ perl: warning: Falling back to the standard locale ("C").
<important> <important>
<para> <para>
Not all APIs supports all the encodings listed above. For example, the Not all <acronym>API</>s supports all the encodings listed above. For example, the
<productname>PostgreSQL</> <productname>PostgreSQL</>
JDBC driver does not support <literal>MULE_INTERNAL</>, <literal>LATIN6</>, JDBC driver does not support <literal>MULE_INTERNAL</>, <literal>LATIN6</>,
<literal>LATIN8</>, and <literal>LATIN10</>. <literal>LATIN8</>, and <literal>LATIN10</>.
...@@ -572,7 +572,7 @@ $ <userinput>psql -l</userinput> ...@@ -572,7 +572,7 @@ $ <userinput>psql -l</userinput>
<para> <para>
<productname>PostgreSQL</productname> supports an automatic <productname>PostgreSQL</productname> supports an automatic
encoding conversion between server and client for some encoding conversion between server and client for some
encodings. The conversion info is stored in pg_converson system encodings. The conversion info is stored in <literal>pg_conversion</> system
catalog. You can create a new conversion by using <command>CREATE catalog. You can create a new conversion by using <command>CREATE
CONVERSION</command>. PostgreSQL comes with some predefined CONVERSION</command>. PostgreSQL comes with some predefined
conversions. They are listed in <xref conversions. They are listed in <xref
...@@ -878,7 +878,7 @@ RESET CLIENT_ENCODING; ...@@ -878,7 +878,7 @@ RESET CLIENT_ENCODING;
<para> <para>
Using client_encoding variable. Using client_encoding variable.
If client_encoding variable in postgresql.conf is set, that If the <varname>client_encoding</> variable in <filename>postgresql.conf</> is set, that
client encoding is automatically selected when a connection to the client encoding is automatically selected when a connection to the
server is made. (This can subsequently be overridden using any of the server is made. (This can subsequently be overridden using any of the
other methods mentioned above.) other methods mentioned above.)
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.38 2002/09/18 20:09:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.39 2002/09/21 18:32:52 petere Exp $
--> -->
<chapter id="client-authentication"> <chapter id="client-authentication">
...@@ -261,7 +261,7 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> < ...@@ -261,7 +261,7 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <
<term><literal>password</></term> <term><literal>password</></term>
<listitem> <listitem>
<para> <para>
Same as "md5", but the password is sent in cleartext over the Same as "md5", but the password is sent in clear text over the
network. This should not be used on untrusted networks. network. This should not be used on untrusted networks.
See <xref linkend="auth-password"> for details. See <xref linkend="auth-password"> for details.
</para> </para>
...@@ -314,8 +314,10 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> < ...@@ -314,8 +314,10 @@ hostssl <replaceable>database</replaceable> <replaceable>user</replaceable> <
<para> <para>
For local connections, this only works on machines that For local connections, this only works on machines that
support Unix-domain socket credentials (currently Linux, support Unix-domain socket credentials (currently
FreeBSD, NetBSD, and BSD/OS). <systemitem class=osname>Linux</>, <systemitem
class=osname>FreeBSD</>, <systemitem class=osname>NetBSD</>,
and <systemitem class=osname>BSD/OS</>).
</para> </para>
<para> <para>
...@@ -504,7 +506,7 @@ local db1,db2,@demodbs all md5 ...@@ -504,7 +506,7 @@ local db1,db2,@demodbs all md5
if you trust every user on every machine that is allowed to connect if you trust every user on every machine that is allowed to connect
to the postmaster by the <filename>pg_hba.conf</> lines that specify to the postmaster by the <filename>pg_hba.conf</> lines that specify
<literal>trust</>. It is seldom reasonable to use <literal>trust</> <literal>trust</>. It is seldom reasonable to use <literal>trust</>
for any TCP connections other than those from localhost (127.0.0.1). for any TCP connections other than those from <systemitem>localhost</> (127.0.0.1).
</para> </para>
</sect2> </sect2>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.103 2002/09/18 21:35:20 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.104 2002/09/21 18:32:52 petere Exp $
--> -->
<chapter id="datatype"> <chapter id="datatype">
...@@ -703,7 +703,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> ( ...@@ -703,7 +703,7 @@ CREATE TABLE <replaceable class="parameter">tablename</replaceable> (
implied <literal>UNIQUE</literal>. This is no longer automatic. If implied <literal>UNIQUE</literal>. This is no longer automatic. If
you wish a serial column to be <literal>UNIQUE</literal> or a you wish a serial column to be <literal>UNIQUE</literal> or a
<literal>PRIMARY KEY</literal> it must now be specified, same as with <literal>PRIMARY KEY</literal> it must now be specified, same as with
any other datatype. any other data type.
</para></note> </para></note>
</sect2> </sect2>
</sect1> </sect1>
...@@ -2028,7 +2028,7 @@ January 8 04:05:06 1999 PST ...@@ -2028,7 +2028,7 @@ January 8 04:05:06 1999 PST
<listitem> <listitem>
<para> <para>
The default time zone is specified as a constant integer offset The default time zone is specified as a constant integer offset
from GMT/UTC. It is not possible to adapt to daylight-saving from <acronym>GMT</>/<acronym>UTC</>. It is not possible to adapt to daylight-saving
time when doing date/time arithmetic across time when doing date/time arithmetic across
<acronym>DST</acronym> boundaries. <acronym>DST</acronym> boundaries.
</para> </para>
...@@ -3025,14 +3025,14 @@ SELECT * FROM test; ...@@ -3025,14 +3025,14 @@ SELECT * FROM test;
<row> <row>
<entry><type>regproc</></entry> <entry><type>regproc</></entry>
<entry>pg_proc</entry> <entry><structname>pg_proc</></entry>
<entry>Function name</entry> <entry>Function name</entry>
<entry>sum</entry> <entry>sum</entry>
</row> </row>
<row> <row>
<entry><type>regprocedure</></entry> <entry><type>regprocedure</></entry>
<entry>pg_proc</entry> <entry><structname>pg_proc</></entry>
<entry>Function with argument types</entry> <entry>Function with argument types</entry>
<entry>sum(int4)</entry> <entry>sum(int4)</entry>
</row> </row>
...@@ -3098,7 +3098,7 @@ SELECT * FROM test; ...@@ -3098,7 +3098,7 @@ SELECT * FROM test;
<para> <para>
Another identifier type used by the system is <type>xid</>, or transaction Another identifier type used by the system is <type>xid</>, or transaction
(abbreviated xact) identifier. This is the datatype of the system columns (abbreviated <abbrev>xact</>) identifier. This is the data type of the system columns
<structfield>xmin</> and <structfield>xmax</>. <structfield>xmin</> and <structfield>xmax</>.
Transaction identifiers are 32-bit quantities. In a long-lived Transaction identifiers are 32-bit quantities. In a long-lived
database it is possible for transaction IDs to wrap around. This database it is possible for transaction IDs to wrap around. This
...@@ -3110,7 +3110,7 @@ SELECT * FROM test; ...@@ -3110,7 +3110,7 @@ SELECT * FROM test;
<para> <para>
A third identifier type used by the system is <type>cid</>, or command A third identifier type used by the system is <type>cid</>, or command
identifier. This is the datatype of the system columns identifier. This is the data type of the system columns
<structfield>cmin</> and <structfield>cmax</>. <structfield>cmin</> and <structfield>cmax</>.
Command identifiers are also 32-bit quantities. This creates a hard Command identifiers are also 32-bit quantities. This creates a hard
limit of 2<superscript>32</> (4 billion) SQL commands within a single limit of 2<superscript>32</> (4 billion) SQL commands within a single
...@@ -3121,7 +3121,7 @@ SELECT * FROM test; ...@@ -3121,7 +3121,7 @@ SELECT * FROM test;
<para> <para>
A final identifier type used by the system is <type>tid</>, or tuple A final identifier type used by the system is <type>tid</>, or tuple
identifier. This is the datatype of the system column identifier. This is the data type of the system column
<structfield>ctid</>. A tuple ID is a pair <structfield>ctid</>. A tuple ID is a pair
(block number, tuple index within block) that identifies the (block number, tuple index within block) that identifies the
physical location of the tuple within its table. physical location of the tuple within its table.
...@@ -3172,10 +3172,10 @@ SELECT * FROM test; ...@@ -3172,10 +3172,10 @@ SELECT * FROM test;
The <productname>PostgreSQL</productname> type system contains a number The <productname>PostgreSQL</productname> type system contains a number
of special-purpose entries that are collectively called of special-purpose entries that are collectively called
<firstterm>pseudo-types</>. A pseudo-type cannot be used as a column <firstterm>pseudo-types</>. A pseudo-type cannot be used as a column
datatype, but it can be used to declare a function's argument or result data type, but it can be used to declare a function's argument or result
type. Each of the available pseudo-types is useful in situations where type. Each of the available pseudo-types is useful in situations where
a function's behavior does not correspond to simply taking or returning a function's behavior does not correspond to simply taking or returning
a value of a specific SQL datatype. a value of a specific SQL data type.
</para> </para>
<para> <para>
...@@ -3198,12 +3198,12 @@ SELECT * FROM test; ...@@ -3198,12 +3198,12 @@ SELECT * FROM test;
<row> <row>
<entry><type>any</></entry> <entry><type>any</></entry>
<entry>Indicates that a function accepts any input datatype whatever</entry> <entry>Indicates that a function accepts any input data type whatever</entry>
</row> </row>
<row> <row>
<entry><type>anyarray</></entry> <entry><type>anyarray</></entry>
<entry>Indicates that a function accepts any array datatype</entry> <entry>Indicates that a function accepts any array data type</entry>
</row> </row>
<row> <row>
...@@ -3243,7 +3243,7 @@ SELECT * FROM test; ...@@ -3243,7 +3243,7 @@ SELECT * FROM test;
<para> <para>
Functions coded in C (whether built-in or dynamically loaded) may be Functions coded in C (whether built-in or dynamically loaded) may be
declared to accept or return any of these pseudo datatypes. It is up to declared to accept or return any of these pseudo data types. It is up to
the function author to ensure that the function will behave safely the function author to ensure that the function will behave safely
when a pseudo-type is used as an argument type. when a pseudo-type is used as an argument type.
</para> </para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.4 2002/09/12 22:05:35 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ddl.sgml,v 1.5 2002/09/21 18:32:52 petere Exp $ -->
<chapter id="ddl"> <chapter id="ddl">
<title>Data Definition</title> <title>Data Definition</title>
...@@ -765,7 +765,7 @@ CREATE TABLE order_items ( ...@@ -765,7 +765,7 @@ CREATE TABLE order_items (
Note that these do not excuse you from observing any constraints. Note that these do not excuse you from observing any constraints.
For example, if an action specifies <literal>SET DEFAULT</literal> For example, if an action specifies <literal>SET DEFAULT</literal>
but the default value would not satisfy the foreign key, the but the default value would not satisfy the foreign key, the
deletion of the primary key wil fail. deletion of the primary key will fail.
</para> </para>
<para> <para>
...@@ -1425,7 +1425,7 @@ SHOW search_path; ...@@ -1425,7 +1425,7 @@ SHOW search_path;
</para> </para>
<para> <para>
The first schema in the seach path that exists is the default The first schema in the search path that exists is the default
location for creating new objects. That is the reason that by location for creating new objects. That is the reason that by
default objects are created in the public schema. When objects default objects are created in the public schema. When objects
are referenced in any other context without schema qualification are referenced in any other context without schema qualification
...@@ -1466,8 +1466,8 @@ SET search_path TO myschema; ...@@ -1466,8 +1466,8 @@ SET search_path TO myschema;
</para> </para>
<para> <para>
The search path works in the same way for datatype names, function names, The search path works in the same way for data type names, function names,
and operator names as it does for table names. Datatype and function and operator names as it does for table names. Data type and function
names can be qualified in exactly the same way as table names. If you names can be qualified in exactly the same way as table names. If you
need to write a qualified operator name in an expression, there is a need to write a qualified operator name in an expression, there is a
special provision: you must write special provision: you must write
...@@ -1519,7 +1519,7 @@ REVOKE CREATE ON public FROM PUBLIC; ...@@ -1519,7 +1519,7 @@ REVOKE CREATE ON public FROM PUBLIC;
<para> <para>
In addition to <literal>public</> and user-created schemas, each In addition to <literal>public</> and user-created schemas, each
database contains a <literal>pg_catalog</> schema, which contains database contains a <literal>pg_catalog</> schema, which contains
the system tables and all the built-in datatypes, functions, and the system tables and all the built-in data types, functions, and
operators. <literal>pg_catalog</> is always effectively part of operators. <literal>pg_catalog</> is always effectively part of
the search path. If it is not named explicitly in the path then the search path. If it is not named explicitly in the path then
it is implicitly searched <emphasis>before</> searching the path's it is implicitly searched <emphasis>before</> searching the path's
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/developer.sgml,v 1.6 2001/10/09 18:45:59 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/developer.sgml,v 1.7 2002/09/21 18:32:52 petere Exp $ -->
<!-- PostgreSQL Developer's Guide --> <!-- PostgreSQL Developer's Guide -->
<book id="developer"> <book id="developer">
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
&bki; &bki;
&page; &page;
&geqo; &geqo;
&gist;
&nls; &nls;
<!-- appendices --> <!-- appendices -->
&cvs; &cvs;
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.21 2002/08/26 23:22:47 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.22 2002/09/21 18:32:52 petere Exp $
--> -->
<sect2 id="dfunc"> <sect2 id="dfunc">
...@@ -58,7 +58,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.21 2002/08/26 23:22:47 momji ...@@ -58,7 +58,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.21 2002/08/26 23:22:47 momji
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><productname>BSD/OS</productname></term> <term><systemitem class="osname">BSD/OS</></term>
<indexterm><primary>BSD/OS</></> <indexterm><primary>BSD/OS</></>
<listitem> <listitem>
<para> <para>
...@@ -70,13 +70,13 @@ gcc -fpic -c foo.c ...@@ -70,13 +70,13 @@ gcc -fpic -c foo.c
ld -shared -o foo.so foo.o ld -shared -o foo.so foo.o
</programlisting> </programlisting>
This is applicable as of version 4.0 of This is applicable as of version 4.0 of
<productname>BSD/OS</productname>. <systemitem class="osname">BSD/OS</>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>FreeBSD</productname></term> <term><systemitem class="osname">FreeBSD</></term>
<indexterm><primary>FreeBSD</></> <indexterm><primary>FreeBSD</></>
<listitem> <listitem>
<para> <para>
...@@ -88,19 +88,19 @@ gcc -fpic -c foo.c ...@@ -88,19 +88,19 @@ 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
<productname>FreeBSD</productname>. <systemitem class="osname">FreeBSD</>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>HP-UX</productname></term> <term><systemitem class="osname">HP-UX</></term>
<indexterm><primary>HP-UX</></> <indexterm><primary>HP-UX</></>
<listitem> <listitem>
<para> <para>
The compiler flag of the system compiler to create The compiler flag of the system compiler to create
<acronym>PIC</acronym> is <option>+z</option>. When using <acronym>PIC</acronym> is <option>+z</option>. When using
<productname>GCC</productname> it's <option>-fpic</option>. The <application>GCC</application> it's <option>-fpic</option>. The
linker flag for shared libraries is <option>-b</option>. So linker flag for shared libraries is <option>-b</option>. So
<programlisting> <programlisting>
cc +z -c foo.c cc +z -c foo.c
...@@ -113,7 +113,7 @@ gcc -fpic -c foo.c ...@@ -113,7 +113,7 @@ gcc -fpic -c foo.c
<programlisting> <programlisting>
ld -b -o foo.sl foo.o ld -b -o foo.sl foo.o
</programlisting> </programlisting>
<productname>HP-UX</productname> uses the extension <systemitem class="osname">HP-UX</> 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>
...@@ -121,7 +121,7 @@ ld -b -o foo.sl foo.o ...@@ -121,7 +121,7 @@ ld -b -o foo.sl foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>IRIX</productname></term> <term><systemitem class="osname">IRIX</></term>
<indexterm><primary>IRIX</></> <indexterm><primary>IRIX</></>
<listitem> <listitem>
<para> <para>
...@@ -137,7 +137,7 @@ ld -shared -o foo.so foo.o ...@@ -137,7 +137,7 @@ ld -shared -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>Linux</productname></term> <term><systemitem class="osname">Linux</></term>
<indexterm><primary>Linux</></> <indexterm><primary>Linux</></>
<listitem> <listitem>
<para> <para>
...@@ -156,7 +156,21 @@ cc -shared -o foo.so foo.o ...@@ -156,7 +156,21 @@ cc -shared -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>NetBSD</productname></term> <term><systemitem class="osname">MacOS X</></term>
<indexterm><primary>MacOS X</></>
<listitem>
<para>
Here is a sample. It assumes the developer tools are installed.
<programlisting>
cc -c foo.c
cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="osname">NetBSD</></term>
<indexterm><primary>NetBSD</></> <indexterm><primary>NetBSD</></>
<listitem> <listitem>
<para> <para>
...@@ -174,7 +188,7 @@ gcc -shared -o foo.so foo.o ...@@ -174,7 +188,7 @@ gcc -shared -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>OpenBSD</productname></term> <term><systemitem class="osname">OpenBSD</></term>
<indexterm><primary>OpenBSD</></> <indexterm><primary>OpenBSD</></>
<listitem> <listitem>
<para> <para>
...@@ -190,30 +204,16 @@ ld -Bshareable -o foo.so foo.o ...@@ -190,30 +204,16 @@ ld -Bshareable -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>OS X</productname></term> <term><systemitem class="osname">Solaris</></term>
<indexterm><primary>OS X</></>
<listitem>
<para>
Here is a sample. It assumes the developer tools are installed.
<programlisting>
cc -c foo.c
cc -bundle -flat_namespace -undefined suppress -o foo.so foo.o
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><productname>Solaris</productname></term>
<indexterm><primary>Solaris</></> <indexterm><primary>Solaris</></>
<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 <productname>GCC</productname>. To <option>-fpic</option> with <application>GCC</>. 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 <productname>GCC</productname>. <option>-shared</option> with <application>GCC</>.
<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
...@@ -228,7 +228,7 @@ gcc -G -o foo.so foo.o ...@@ -228,7 +228,7 @@ gcc -G -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>Tru64 UNIX</term> <term><systemitem class="osname">Tru64 UNIX</></term>
<indexterm><primary>Tru64 UNIX</></> <indexterm><primary>Tru64 UNIX</></>
<indexterm><primary>Digital UNIX</><see>Tru64 UNIX</></> <indexterm><primary>Digital UNIX</><see>Tru64 UNIX</></>
<listitem> <listitem>
...@@ -247,7 +247,7 @@ ld -shared -expect_unresolved '*' -o foo.so foo.o ...@@ -247,7 +247,7 @@ ld -shared -expect_unresolved '*' -o foo.so foo.o
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><productname>UnixWare</productname></term> <term><systemitem class="osname">UnixWare</></term>
<indexterm><primary>UnixWare</></> <indexterm><primary>UnixWare</></>
<listitem> <listitem>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/diskusage.sgml,v 1.4 2002/07/05 00:14:16 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/diskusage.sgml,v 1.5 2002/09/21 18:32:52 petere Exp $
--> -->
<chapter id="diskusage"> <chapter id="diskusage">
...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/diskusage.sgml,v 1.4 2002/07/05 00:14:16 mo ...@@ -16,7 +16,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/diskusage.sgml,v 1.4 2002/07/05 00:14:16 mo
Each table has a primary heap disk file where most of the data is Each table has a primary heap disk file where most of the data is
stored. To store long column values, there is also a stored. To store long column values, there is also a
<acronym>TOAST</> file associated with the table, named based on the <acronym>TOAST</> file associated with the table, named based on the
table's oid (actually pg_class.relfilenode), and an index on the table's OID (actually <literal>pg_class.relfilenode</>), and an index on the
<acronym>TOAST</> table. There also may be indexes associated with <acronym>TOAST</> table. There also may be indexes associated with
the base table. the base table.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.36 2002/01/20 22:19:55 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.37 2002/09/21 18:32:52 petere Exp $
--> -->
<chapter id="ecpg"> <chapter id="ecpg">
...@@ -158,8 +158,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.36 2002/01/20 22:19:55 petere ...@@ -158,8 +158,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v 1.36 2002/01/20 22:19:55 petere
<programlisting> <programlisting>
exec sql include sqlca; exec sql include sqlca;
</programlisting> </programlisting>
in the include section of your file. This will define a struct and in the include section of your file. This will define a <type>struct</> and
a variable with the name <parameter>sqlca</parameter> as follows: a variable with the name <varname>sqlca</varname> as follows:
<programlisting> <programlisting>
struct sqlca struct sqlca
{ {
...@@ -198,7 +198,7 @@ struct sqlca ...@@ -198,7 +198,7 @@ struct sqlca
<para> <para>
If an no error occurred in the last <acronym>SQL</acronym> statement. If an no error occurred in the last <acronym>SQL</acronym> statement.
<parameter>sqlca.sqlcode</parameter> will be 0 (ECPG_NO_ERROR). If <parameter>sqlca.sqlcode</parameter> will be 0 (<symbol>ECPG_NO_ERROR</>). If
<parameter>sqlca.sqlcode</parameter> is less that zero, this is a <parameter>sqlca.sqlcode</parameter> is less that zero, this is a
serious error, like the database definition does not match the serious error, like the database definition does not match the
query. If it is greater than zero, it is a normal error like the query. If it is greater than zero, it is a normal error like the
...@@ -620,8 +620,9 @@ exec sql end declare section; ...@@ -620,8 +620,9 @@ exec sql end declare section;
</para> </para>
<para> <para>
The special types <type>VARCHAR</type> and <type>VARCHAR2</type> are converted into a named struct The special types <type>VARCHAR</type> and
for every variable. A declaration like: <type>VARCHAR2</type> are converted into a named <type>struct</> for
every variable. A declaration like:
<programlisting> <programlisting>
VARCHAR var[180]; VARCHAR var[180];
</programlisting> </programlisting>
...@@ -1023,10 +1024,10 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ", ...@@ -1023,10 +1024,10 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ",
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>ECPGt_EOIT</literal></term> <term><parameter>ECPGt_EOIT</></term>
<listitem> <listitem>
<para> <para>
An enum telling that there are no more input variables. An <type>enum</> telling that there are no more input variables.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -1042,10 +1043,10 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ", ...@@ -1042,10 +1043,10 @@ ECPGdo(__LINE__, NULL, "select res from mytable where index = ? ",
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>ECPGt_EORT</term> <term><parameter>ECPGt_EORT</></term>
<listitem> <listitem>
<para> <para>
An enum telling that there are no more variables. An <type>enum</> telling that there are no more variables.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.16 2002/07/30 17:34:37 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.17 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="extend"> <chapter id="extend">
...@@ -135,51 +135,51 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.16 2002/07/30 17:34:37 tgl ...@@ -135,51 +135,51 @@ $Header: /cvsroot/pgsql/doc/src/sgml/extend.sgml,v 1.16 2002/07/30 17:34:37 tgl
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry>pg_database</entry> <entry><structname>pg_database</></entry>
<entry> databases</entry> <entry> databases</entry>
</row> </row>
<row> <row>
<entry>pg_class</entry> <entry><structname>pg_class</></entry>
<entry> tables</entry> <entry> tables</entry>
</row> </row>
<row> <row>
<entry>pg_attribute</entry> <entry><structname>pg_attribute</></entry>
<entry> table columns</entry> <entry> table columns</entry>
</row> </row>
<row> <row>
<entry>pg_index</entry> <entry><structname>pg_index</></entry>
<entry> indexes</entry> <entry> indexes</entry>
</row> </row>
<row> <row>
<entry>pg_proc</entry> <entry><structname>pg_proc</></entry>
<entry> procedures/functions </entry> <entry> procedures/functions </entry>
</row> </row>
<row> <row>
<entry>pg_type</entry> <entry><structname>pg_type</></entry>
<entry> data types (both base and complex)</entry> <entry> data types (both base and complex)</entry>
</row> </row>
<row> <row>
<entry>pg_operator</entry> <entry><structname>pg_operator</></entry>
<entry> operators</entry> <entry> operators</entry>
</row> </row>
<row> <row>
<entry>pg_aggregate</entry> <entry><structname>pg_aggregate</></entry>
<entry> aggregate functions</entry> <entry> aggregate functions</entry>
</row> </row>
<row> <row>
<entry>pg_am</entry> <entry><structname>pg_am</></entry>
<entry> access methods</entry> <entry> access methods</entry>
</row> </row>
<row> <row>
<entry>pg_amop</entry> <entry><structname>pg_amop</></entry>
<entry> access method operators</entry> <entry> access method operators</entry>
</row> </row>
<row> <row>
<entry>pg_amproc</entry> <entry><structname>pg_amproc</></entry>
<entry> access method support functions</entry> <entry> access method support functions</entry>
</row> </row>
<row> <row>
<entry>pg_opclass</entry> <entry><structname>pg_opclass</></entry>
<entry> access method operator classes</entry> <entry> access method operator classes</entry>
</row> </row>
</tbody> </tbody>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.6 2002/08/04 06:17:29 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.7 2002/09/21 18:32:53 petere Exp $
--> -->
<appendix id="features"> <appendix id="features">
...@@ -1089,12 +1089,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.6 2002/08/04 06:17:29 tho ...@@ -1089,12 +1089,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.6 2002/08/04 06:17:29 tho
</row> </row>
<row> <row>
<entry>F831-01</entry> <entry>F831-01</entry>
<entry>Updateable scrollable cursors</entry> <entry>Updatable scrollable cursors</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<entry>F831-02</entry> <entry>F831-02</entry>
<entry>Updateable ordered cursors</entry> <entry>Updatable ordered cursors</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.123 2002/09/20 03:44:06 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.124 2002/09/21 18:32:53 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -74,7 +74,7 @@ PostgreSQL documentation ...@@ -74,7 +74,7 @@ PostgreSQL documentation
<member>NOT</member> <member>NOT</member>
</simplelist> </simplelist>
<acronym>SQL</acronym> uses a three-valued Boolean logic where NULL represents <acronym>SQL</acronym> uses a three-valued Boolean logic where the null value represents
<quote>unknown</quote>. Observe the following truth tables: <quote>unknown</quote>. Observe the following truth tables:
<informaltable> <informaltable>
...@@ -261,7 +261,7 @@ PostgreSQL documentation ...@@ -261,7 +261,7 @@ PostgreSQL documentation
</para> </para>
<para> <para>
To check whether a value is or is not NULL, use the constructs To check whether a value is or is not null, use the constructs
<synopsis> <synopsis>
<replaceable>expression</replaceable> IS NULL <replaceable>expression</replaceable> IS NULL
<replaceable>expression</replaceable> IS NOT NULL <replaceable>expression</replaceable> IS NOT NULL
...@@ -276,16 +276,16 @@ PostgreSQL documentation ...@@ -276,16 +276,16 @@ PostgreSQL documentation
<para> <para>
Do <emphasis>not</emphasis> write Do <emphasis>not</emphasis> write
<literal><replaceable>expression</replaceable> = NULL</literal> <literal><replaceable>expression</replaceable> = NULL</literal>
because NULL is not <quote>equal to</quote> NULL. (NULL represents because <literal>NULL</> is not <quote>equal to</quote>
an unknown value, and it is not known whether two unknown values are <literal>NULL</>. (The null value represents an unknown value,
equal.) and it is not known whether two unknown values are equal.)
</para> </para>
<para> <para>
Some applications may (incorrectly) require that Some applications may (incorrectly) require that
<literal><replaceable>expression</replaceable> = NULL</literal> <literal><replaceable>expression</replaceable> = NULL</literal>
returns true if <replaceable>expression</replaceable> evaluates to returns true if <replaceable>expression</replaceable> evaluates to
the NULL value. To support these applications, the run-time option the null value. To support these applications, the run-time option
<varname>transform_null_equals</varname> can be turned on (e.g., <varname>transform_null_equals</varname> can be turned on (e.g.,
<literal>SET transform_null_equals TO ON;</literal>). <literal>SET transform_null_equals TO ON;</literal>).
<productname>PostgreSQL</productname> will then convert <productname>PostgreSQL</productname> will then convert
...@@ -305,8 +305,8 @@ PostgreSQL documentation ...@@ -305,8 +305,8 @@ PostgreSQL documentation
<replaceable>expression</replaceable> IS NOT UNKNOWN <replaceable>expression</replaceable> IS NOT UNKNOWN
</synopsis> </synopsis>
These are similar to <literal>IS NULL</literal> in that they will These are similar to <literal>IS NULL</literal> in that they will
always return TRUE or FALSE, never NULL, even when the operand is NULL. always return true or false, never a null value, even when the operand is null.
A NULL input is treated as the logical value UNKNOWN. A null input is treated as the logical value <quote>unknown</>.
</para> </para>
</sect1> </sect1>
...@@ -973,687 +973,687 @@ PostgreSQL documentation ...@@ -973,687 +973,687 @@ PostgreSQL documentation
<tbody> <tbody>
<row> <row>
<entry>ascii_to_mic</entry> <entry><literal>ascii_to_mic</literal></entry>
<entry>SQL_ASCII</entry> <entry><literal>SQL_ASCII</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>ascii_to_utf_8</entry> <entry><literal>ascii_to_utf_8</literal></entry>
<entry>SQL_ASCII</entry> <entry><literal>SQL_ASCII</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>big5_to_euc_tw</entry> <entry><literal>big5_to_euc_tw</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
</row> </row>
<row> <row>
<entry>big5_to_mic</entry> <entry><literal>big5_to_mic</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>big5_to_utf_8</entry> <entry><literal>big5_to_utf_8</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>euc_cn_to_mic</entry> <entry><literal>euc_cn_to_mic</literal></entry>
<entry>EUC_CN</entry> <entry><literal>EUC_CN</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>euc_cn_to_utf_8</entry> <entry><literal>euc_cn_to_utf_8</literal></entry>
<entry>EUC_CN</entry> <entry><literal>EUC_CN</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>euc_jp_to_mic</entry> <entry><literal>euc_jp_to_mic</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>euc_jp_to_sjis</entry> <entry><literal>euc_jp_to_sjis</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
</row> </row>
<row> <row>
<entry>euc_jp_to_utf_8</entry> <entry><literal>euc_jp_to_utf_8</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>euc_kr_to_mic</entry> <entry><literal>euc_kr_to_mic</literal></entry>
<entry>EUC_KR</entry> <entry><literal>EUC_KR</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>euc_kr_to_utf_8</entry> <entry><literal>euc_kr_to_utf_8</literal></entry>
<entry>EUC_KR</entry> <entry><literal>EUC_KR</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>euc_tw_to_big5</entry> <entry><literal>euc_tw_to_big5</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
</row> </row>
<row> <row>
<entry>euc_tw_to_mic</entry> <entry><literal>euc_tw_to_mic</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>euc_tw_to_utf_8</entry> <entry><literal>euc_tw_to_utf_8</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>gb18030_to_utf_8</entry> <entry><literal>gb18030_to_utf_8</literal></entry>
<entry>GB18030</entry> <entry><literal>GB18030</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>gbk_to_utf_8</entry> <entry><literal>gbk_to_utf_8</literal></entry>
<entry>GBK</entry> <entry><literal>GBK</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_10_to_utf_8</entry> <entry><literal>iso_8859_10_to_utf_8</literal></entry>
<entry>LATIN6</entry> <entry><literal>LATIN6</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_13_to_utf_8</entry> <entry><literal>iso_8859_13_to_utf_8</literal></entry>
<entry>LATIN7</entry> <entry><literal>LATIN7</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_14_to_utf_8</entry> <entry><literal>iso_8859_14_to_utf_8</literal></entry>
<entry>LATIN8</entry> <entry><literal>LATIN8</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_15_to_utf_8</entry> <entry><literal>iso_8859_15_to_utf_8</literal></entry>
<entry>LATIN9</entry> <entry><literal>LATIN9</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_16_to_utf_8</entry> <entry><literal>iso_8859_16_to_utf_8</literal></entry>
<entry>LATIN10</entry> <entry><literal>LATIN10</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_1_to_mic</entry> <entry><literal>iso_8859_1_to_mic</literal></entry>
<entry>LATIN1</entry> <entry><literal>LATIN1</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_1_to_utf_8</entry> <entry><literal>iso_8859_1_to_utf_8</literal></entry>
<entry>LATIN1</entry> <entry><literal>LATIN1</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_2_to_mic</entry> <entry><literal>iso_8859_2_to_mic</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_2_to_utf_8</entry> <entry><literal>iso_8859_2_to_utf_8</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_2_to_win1250</entry> <entry><literal>iso_8859_2_to_win1250</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_3_to_mic</entry> <entry><literal>iso_8859_3_to_mic</literal></entry>
<entry>LATIN3</entry> <entry><literal>LATIN3</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_3_to_utf_8</entry> <entry><literal>iso_8859_3_to_utf_8</literal></entry>
<entry>LATIN3</entry> <entry><literal>LATIN3</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_4_to_mic</entry> <entry><literal>iso_8859_4_to_mic</literal></entry>
<entry>LATIN4</entry> <entry><literal>LATIN4</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_4_to_utf_8</entry> <entry><literal>iso_8859_4_to_utf_8</literal></entry>
<entry>LATIN4</entry> <entry><literal>LATIN4</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_5_to_koi8r</entry> <entry><literal>iso_8859_5_to_koi8r</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_5_to_mic</entry> <entry><literal>iso_8859_5_to_mic</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_5_to_utf_8</entry> <entry><literal>iso_8859_5_to_utf_8</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_5_to_win1251</entry> <entry><literal>iso_8859_5_to_win1251</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_5_to_win866</entry> <entry><literal>iso_8859_5_to_win866</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_6_to_utf_8</entry> <entry><literal>iso_8859_6_to_utf_8</literal></entry>
<entry>ISO_8859_6</entry> <entry><literal>ISO_8859_6</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_7_to_utf_8</entry> <entry><literal>iso_8859_7_to_utf_8</literal></entry>
<entry>ISO_8859_7</entry> <entry><literal>ISO_8859_7</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_8_to_utf_8</entry> <entry><literal>iso_8859_8_to_utf_8</literal></entry>
<entry>ISO_8859_8</entry> <entry><literal>ISO_8859_8</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>iso_8859_9_to_utf_8</entry> <entry><literal>iso_8859_9_to_utf_8</literal></entry>
<entry>LATIN5</entry> <entry><literal>LATIN5</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>johab_to_utf_8</entry> <entry><literal>johab_to_utf_8</literal></entry>
<entry>JOHAB</entry> <entry><literal>JOHAB</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>koi8r_to_iso_8859_5</entry> <entry><literal>koi8r_to_iso_8859_5</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
</row> </row>
<row> <row>
<entry>koi8r_to_mic</entry> <entry><literal>koi8r_to_mic</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>koi8r_to_utf_8</entry> <entry><literal>koi8r_to_utf_8</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>koi8r_to_win1251</entry> <entry><literal>koi8r_to_win1251</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
</row> </row>
<row> <row>
<entry>koi8r_to_win866</entry> <entry><literal>koi8r_to_win866</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_ascii</entry> <entry><literal>mic_to_ascii</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>SQL_ASCII</entry> <entry><literal>SQL_ASCII</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_big5</entry> <entry><literal>mic_to_big5</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_euc_cn</entry> <entry><literal>mic_to_euc_cn</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>EUC_CN</entry> <entry><literal>EUC_CN</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_euc_jp</entry> <entry><literal>mic_to_euc_jp</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_euc_kr</entry> <entry><literal>mic_to_euc_kr</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>EUC_KR</entry> <entry><literal>EUC_KR</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_euc_tw</entry> <entry><literal>mic_to_euc_tw</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_iso_8859_1</entry> <entry><literal>mic_to_iso_8859_1</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>LATIN1</entry> <entry><literal>LATIN1</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_iso_8859_2</entry> <entry><literal>mic_to_iso_8859_2</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_iso_8859_3</entry> <entry><literal>mic_to_iso_8859_3</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>LATIN3</entry> <entry><literal>LATIN3</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_iso_8859_4</entry> <entry><literal>mic_to_iso_8859_4</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>LATIN4</entry> <entry><literal>LATIN4</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_iso_8859_5</entry> <entry><literal>mic_to_iso_8859_5</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_koi8r</entry> <entry><literal>mic_to_koi8r</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_sjis</entry> <entry><literal>mic_to_sjis</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_win1250</entry> <entry><literal>mic_to_win1250</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_win1251</entry> <entry><literal>mic_to_win1251</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
</row> </row>
<row> <row>
<entry>mic_to_win866</entry> <entry><literal>mic_to_win866</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
</row> </row>
<row> <row>
<entry>sjis_to_euc_jp</entry> <entry><literal>sjis_to_euc_jp</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
</row> </row>
<row> <row>
<entry>sjis_to_mic</entry> <entry><literal>sjis_to_mic</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>sjis_to_utf_8</entry> <entry><literal>sjis_to_utf_8</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>tcvn_to_utf_8</entry> <entry><literal>tcvn_to_utf_8</literal></entry>
<entry>TCVN</entry> <entry><literal>TCVN</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>uhc_to_utf_8</entry> <entry><literal>uhc_to_utf_8</literal></entry>
<entry>UHC</entry> <entry><literal>UHC</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_ascii</entry> <entry><literal>utf_8_to_ascii</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>SQL_ASCII</entry> <entry><literal>SQL_ASCII</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_big5</entry> <entry><literal>utf_8_to_big5</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>BIG5</entry> <entry><literal>BIG5</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_euc_cn</entry> <entry><literal>utf_8_to_euc_cn</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>EUC_CN</entry> <entry><literal>EUC_CN</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_euc_jp</entry> <entry><literal>utf_8_to_euc_jp</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>EUC_JP</entry> <entry><literal>EUC_JP</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_euc_kr</entry> <entry><literal>utf_8_to_euc_kr</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>EUC_KR</entry> <entry><literal>EUC_KR</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_euc_tw</entry> <entry><literal>utf_8_to_euc_tw</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>EUC_TW</entry> <entry><literal>EUC_TW</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_gb18030</entry> <entry><literal>utf_8_to_gb18030</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>GB18030</entry> <entry><literal>GB18030</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_gbk</entry> <entry><literal>utf_8_to_gbk</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>GBK</entry> <entry><literal>GBK</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_1</entry> <entry><literal>utf_8_to_iso_8859_1</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN1</entry> <entry><literal>LATIN1</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_10</entry> <entry><literal>utf_8_to_iso_8859_10</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN6</entry> <entry><literal>LATIN6</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_13</entry> <entry><literal>utf_8_to_iso_8859_13</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN7</entry> <entry><literal>LATIN7</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_14</entry> <entry><literal>utf_8_to_iso_8859_14</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN8</entry> <entry><literal>LATIN8</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_15</entry> <entry><literal>utf_8_to_iso_8859_15</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN9</entry> <entry><literal>LATIN9</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_16</entry> <entry><literal>utf_8_to_iso_8859_16</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN10</entry> <entry><literal>LATIN10</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_2</entry> <entry><literal>utf_8_to_iso_8859_2</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_3</entry> <entry><literal>utf_8_to_iso_8859_3</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN3</entry> <entry><literal>LATIN3</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_4</entry> <entry><literal>utf_8_to_iso_8859_4</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN4</entry> <entry><literal>LATIN4</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_5</entry> <entry><literal>utf_8_to_iso_8859_5</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_6</entry> <entry><literal>utf_8_to_iso_8859_6</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>ISO_8859_6</entry> <entry><literal>ISO_8859_6</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_7</entry> <entry><literal>utf_8_to_iso_8859_7</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>ISO_8859_7</entry> <entry><literal>ISO_8859_7</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_8</entry> <entry><literal>utf_8_to_iso_8859_8</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>ISO_8859_8</entry> <entry><literal>ISO_8859_8</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_iso_8859_9</entry> <entry><literal>utf_8_to_iso_8859_9</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>LATIN5</entry> <entry><literal>LATIN5</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_johab</entry> <entry><literal>utf_8_to_johab</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>JOHAB</entry> <entry><literal>JOHAB</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_koi8r</entry> <entry><literal>utf_8_to_koi8r</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_sjis</entry> <entry><literal>utf_8_to_sjis</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>SJIS</entry> <entry><literal>SJIS</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_tcvn</entry> <entry><literal>utf_8_to_tcvn</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>TCVN</entry> <entry><literal>TCVN</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_uhc</entry> <entry><literal>utf_8_to_uhc</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>UHC</entry> <entry><literal>UHC</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_win1250</entry> <entry><literal>utf_8_to_win1250</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_win1251</entry> <entry><literal>utf_8_to_win1251</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_win1256</entry> <entry><literal>utf_8_to_win1256</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>WIN1256</entry> <entry><literal>WIN1256</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_win866</entry> <entry><literal>utf_8_to_win866</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
</row> </row>
<row> <row>
<entry>utf_8_to_win874</entry> <entry><literal>utf_8_to_win874</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
<entry>WIN874</entry> <entry><literal>WIN874</literal></entry>
</row> </row>
<row> <row>
<entry>win1250_to_iso_8859_2</entry> <entry><literal>win1250_to_iso_8859_2</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
<entry>LATIN2</entry> <entry><literal>LATIN2</literal></entry>
</row> </row>
<row> <row>
<entry>win1250_to_mic</entry> <entry><literal>win1250_to_mic</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>win1250_to_utf_8</entry> <entry><literal>win1250_to_utf_8</literal></entry>
<entry>WIN1250</entry> <entry><literal>WIN1250</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>win1251_to_iso_8859_5</entry> <entry><literal>win1251_to_iso_8859_5</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
</row> </row>
<row> <row>
<entry>win1251_to_koi8r</entry> <entry><literal>win1251_to_koi8r</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
</row> </row>
<row> <row>
<entry>win1251_to_mic</entry> <entry><literal>win1251_to_mic</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>win1251_to_utf_8</entry> <entry><literal>win1251_to_utf_8</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>win1251_to_win866</entry> <entry><literal>win1251_to_win866</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
</row> </row>
<row> <row>
<entry>win1256_to_utf_8</entry> <entry><literal>win1256_to_utf_8</literal></entry>
<entry>WIN1256</entry> <entry><literal>WIN1256</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>win866_to_iso_8859_5</entry> <entry><literal>win866_to_iso_8859_5</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
<entry>ISO_8859_5</entry> <entry><literal>ISO_8859_5</literal></entry>
</row> </row>
<row> <row>
<entry>win866_to_koi8r</entry> <entry><literal>win866_to_koi8r</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
<entry>KOI8</entry> <entry><literal>KOI8</literal></entry>
</row> </row>
<row> <row>
<entry>win866_to_mic</entry> <entry><literal>win866_to_mic</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
<entry>MULE_INTERNAL</entry> <entry><literal>MULE_INTERNAL</literal></entry>
</row> </row>
<row> <row>
<entry>win866_to_utf_8</entry> <entry><literal>win866_to_utf_8</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
<row> <row>
<entry>win866_to_win1251</entry> <entry><literal>win866_to_win1251</literal></entry>
<entry>ALT</entry> <entry><literal>ALT</literal></entry>
<entry>WIN</entry> <entry><literal>WIN</literal></entry>
</row> </row>
<row> <row>
<entry>win874_to_utf_8</entry> <entry><literal>win874_to_utf_8</literal></entry>
<entry>WIN874</entry> <entry><literal>WIN874</literal></entry>
<entry>UNICODE</entry> <entry><literal>UNICODE</literal></entry>
</row> </row>
</tbody> </tbody>
...@@ -2389,12 +2389,12 @@ PostgreSQL documentation ...@@ -2389,12 +2389,12 @@ PostgreSQL documentation
<!-- derived from the re_format.7 man page --> <!-- derived from the re_format.7 man page -->
<para> <para>
Regular expressions (<quote>RE</quote>s), as defined in Regular expressions (<acronym>RE</acronym>s), as defined in
<acronym>POSIX</acronym> <acronym>POSIX</acronym>
1003.2, come in two forms: modern REs (roughly those of 1003.2, come in two forms: modern <acronym>RE</acronym>s (roughly those of
<command>egrep</command>; 1003.2 calls these <command>egrep</command>; 1003.2 calls these
<quote>extended</quote> REs) and obsolete REs (roughly those of <quote>extended</quote> <acronym>RE</acronym>s) and obsolete <acronym>RE</acronym>s (roughly those of
<command>ed</command>; 1003.2 <quote>basic</quote> REs). <command>ed</command>; 1003.2 <quote>basic</quote> <acronym>RE</acronym>s).
<productname>PostgreSQL</productname> implements the modern form. <productname>PostgreSQL</productname> implements the modern form.
</para> </para>
...@@ -2606,7 +2606,7 @@ PostgreSQL documentation ...@@ -2606,7 +2606,7 @@ PostgreSQL documentation
</para> </para>
<para> <para>
There is no particular limit on the length of REs, except insofar There is no particular limit on the length of <acronym>RE</acronym>s, except insofar
as memory is limited. Memory usage is approximately linear in RE as memory is limited. Memory usage is approximately linear in RE
size, and largely insensitive to RE complexity, except for bounded size, and largely insensitive to RE complexity, except for bounded
repetitions. Bounded repetitions are implemented by macro repetitions. Bounded repetitions are implemented by macro
...@@ -4923,7 +4923,7 @@ SELECT setval('foo', 42, false); <lineannotation>Next nextval() will return 4 ...@@ -4923,7 +4923,7 @@ SELECT setval('foo', 42, false); <lineannotation>Next nextval() will return 4
</para> </para>
</tip> </tip>
<bridgehead renderas="sect2">CASE</bridgehead> <bridgehead renderas="sect2"><literal>CASE</></bridgehead>
<synopsis> <synopsis>
CASE WHEN <replaceable>condition</replaceable> THEN <replaceable>result</replaceable> CASE WHEN <replaceable>condition</replaceable> THEN <replaceable>result</replaceable>
...@@ -4945,7 +4945,7 @@ END ...@@ -4945,7 +4945,7 @@ END
<replaceable>condition</replaceable> is true then the value of the <replaceable>condition</replaceable> is true then the value of the
case expression is the <replaceable>result</replaceable> in the case expression is the <replaceable>result</replaceable> in the
<token>ELSE</token> clause. If the <token>ELSE</token> clause is <token>ELSE</token> clause. If the <token>ELSE</token> clause is
omitted and no condition matches, the result is NULL. omitted and no condition matches, the result is null.
</para> </para>
<informalexample> <informalexample>
...@@ -4999,7 +4999,7 @@ END ...@@ -4999,7 +4999,7 @@ END
all the <replaceable>value</replaceable>s in the all the <replaceable>value</replaceable>s in the
<token>WHEN</token> clauses until one is found that is equal. If <token>WHEN</token> clauses until one is found that is equal. If
no match is found, the <replaceable>result</replaceable> in the no match is found, the <replaceable>result</replaceable> in the
<token>ELSE</token> clause (or NULL) is returned. This is similar <token>ELSE</token> clause (or a null value) is returned. This is similar
to the <function>switch</function> statement in C. to the <function>switch</function> statement in C.
</para> </para>
...@@ -5025,7 +5025,7 @@ END ...@@ -5025,7 +5025,7 @@ END
</para> </para>
</informalexample> </informalexample>
<bridgehead renderas="sect2">COALESCE</bridgehead> <bridgehead renderas="sect2"><literal>COALESCE</></bridgehead>
<synopsis> <synopsis>
<function>COALESCE</function>(<replaceable>value</replaceable> <function>COALESCE</function>(<replaceable>value</replaceable>
...@@ -5034,15 +5034,15 @@ END ...@@ -5034,15 +5034,15 @@ END
<para> <para>
The <function>COALESCE</function> function returns the first of its The <function>COALESCE</function> function returns the first of its
arguments that is not NULL. This is often useful to substitute a arguments that is not null. This is often useful to substitute a
default value for NULL values when data is retrieved for display, default value for null values when data is retrieved for display,
for example: for example:
<programlisting> <programlisting>
SELECT COALESCE(description, short_description, '(none)') ... SELECT COALESCE(description, short_description, '(none)') ...
</programlisting> </programlisting>
</para> </para>
<bridgehead renderas="sect2">NULLIF</bridgehead> <bridgehead renderas="sect2"><literal>NULLIF</></bridgehead>
<indexterm> <indexterm>
<primary>nullif</primary> <primary>nullif</primary>
...@@ -5054,7 +5054,7 @@ SELECT COALESCE(description, short_description, '(none)') ... ...@@ -5054,7 +5054,7 @@ SELECT COALESCE(description, short_description, '(none)') ...
</synopsis> </synopsis>
<para> <para>
The <function>NULLIF</function> function returns NULL if and only The <function>NULLIF</function> function returns a null value if and only
if <replaceable>value1</replaceable> and if <replaceable>value1</replaceable> and
<replaceable>value2</replaceable> are equal. Otherwise it returns <replaceable>value2</replaceable> are equal. Otherwise it returns
<replaceable>value1</replaceable>. This can be used to perform the <replaceable>value1</replaceable>. This can be used to perform the
...@@ -5169,7 +5169,7 @@ SELECT NULLIF(value, '(none)') ... ...@@ -5169,7 +5169,7 @@ SELECT NULLIF(value, '(none)') ...
<para> <para>
<function>current_schema</function> returns the name of the schema that is <function>current_schema</function> returns the name of the schema that is
at the front of the search path (or NULL if the search path is at the front of the search path (or a null value if the search path is
empty). This is the schema that will be used for any tables or empty). This is the schema that will be used for any tables or
other named objects that are created without specifying a target schema. other named objects that are created without specifying a target schema.
<function>current_schemas(boolean)</function> returns an array of the names of all <function>current_schemas(boolean)</function> returns an array of the names of all
...@@ -5183,7 +5183,7 @@ SELECT NULLIF(value, '(none)') ... ...@@ -5183,7 +5183,7 @@ SELECT NULLIF(value, '(none)') ...
<primary>search path</primary> <primary>search path</primary>
<secondary>changing at runtime</secondary> <secondary>changing at runtime</secondary>
</indexterm> </indexterm>
The search path may be altered by a runtime-alterable GUC setting. The The search path may be altered by a run-time setting. The
command to use is <command> command to use is <command>
SET SEARCH_PATH '<varname>schema</varname>'[,'<varname>schema</varname>']... SET SEARCH_PATH '<varname>schema</varname>'[,'<varname>schema</varname>']...
</command> </command>
...@@ -5425,7 +5425,7 @@ SELECT has_table_privilege('myschema.mytable', 'select'); ...@@ -5425,7 +5425,7 @@ SELECT has_table_privilege('myschema.mytable', 'select');
can access a function in a particular way. The possibilities for its can access a function in a particular way. The possibilities for its
arguments are analogous to <function>has_table_privilege</function>. arguments are analogous to <function>has_table_privilege</function>.
When specifying a function by a text string rather than by OID, When specifying a function by a text string rather than by OID,
the allowed input is the same as for the <type>regprocedure</> datatype. the allowed input is the same as for the <type>regprocedure</> data type.
The desired access type must currently evaluate to The desired access type must currently evaluate to
<literal>EXECUTE</literal>. <literal>EXECUTE</literal>.
</para> </para>
...@@ -5527,7 +5527,7 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid); ...@@ -5527,7 +5527,7 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid);
visibility check for types, functions, operators, and operator classes, visibility check for types, functions, operators, and operator classes,
respectively. For functions and operators, an object in the search path respectively. For functions and operators, an object in the search path
is visible if there is no object of the same name <emphasis>and argument is visible if there is no object of the same name <emphasis>and argument
datatype(s)</> earlier in the path. For operator classes, data type(s)</> earlier in the path. For operator classes,
both name and associated index access method are considered. both name and associated index access method are considered.
</para> </para>
...@@ -5657,7 +5657,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); ...@@ -5657,7 +5657,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<para> <para>
These functions extract comments previously stored with the These functions extract comments previously stored with the
<command>COMMENT</command> command. <literal>NULL</literal> is returned if <command>COMMENT</command> command. A null value is returned if
no comment can be found matching the specified parameters. no comment can be found matching the specified parameters.
</para> </para>
...@@ -5742,7 +5742,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); ...@@ -5742,7 +5742,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<entry><function>count</function>(<replaceable class="parameter">expression</replaceable>)</entry> <entry><function>count</function>(<replaceable class="parameter">expression</replaceable>)</entry>
<entry> <entry>
Counts the input values for which the value of <replaceable Counts the input values for which the value of <replaceable
class="parameter">expression</replaceable> is not NULL. class="parameter">expression</replaceable> is not null.
</entry> </entry>
<entry>The return value is of type <type>bigint</type>.</entry> <entry>The return value is of type <type>bigint</type>.</entry>
</row> </row>
...@@ -5818,10 +5818,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); ...@@ -5818,10 +5818,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<para> <para>
It should be noted that except for <function>COUNT</function>, It should be noted that except for <function>COUNT</function>,
these functions return NULL when no rows are selected. In these functions return a null value when no rows are selected. In
particular, <function>SUM</function> of no rows returns NULL, not particular, <function>SUM</function> of no rows returns null, not
zero as one might expect. <function>COALESCE</function> may be zero as one might expect. <function>COALESCE</function> may be
used to substitute zero for NULL when necessary. used to substitute zero for null when necessary.
</para> </para>
</sect1> </sect1>
...@@ -5992,7 +5992,7 @@ OR ...@@ -5992,7 +5992,7 @@ OR
</para> </para>
<para> <para>
As usual, NULLs in the expressions or subquery rows are combined per As usual, null values in the expressions or subquery rows are combined per
the normal rules of SQL Boolean expressions. Two rows are considered the normal rules of SQL Boolean expressions. Two rows are considered
equal if all their corresponding members are non-null and equal; the rows equal if all their corresponding members are non-null and equal; the rows
are unequal if any corresponding members are non-null and unequal; are unequal if any corresponding members are non-null and unequal;
...@@ -6033,7 +6033,7 @@ AND ...@@ -6033,7 +6033,7 @@ AND
<tip> <tip>
<para> <para>
<literal>x NOT IN y</literal> is equivalent to <literal>NOT (x IN y)</literal> in all <literal>x NOT IN y</literal> is equivalent to <literal>NOT (x IN y)</literal> in all
cases. However, NULLs are much more likely to trip up the novice when cases. However, null values are much more likely to trip up the novice when
working with <token>NOT IN</token> than when working with <token>IN</token>. working with <token>NOT IN</token> than when working with <token>IN</token>.
It's best to express your condition positively if possible. It's best to express your condition positively if possible.
</para> </para>
...@@ -6084,7 +6084,7 @@ AND ...@@ -6084,7 +6084,7 @@ AND
</para> </para>
<para> <para>
As usual, NULLs in the expressions or subquery rows are combined per As usual, null values in the expressions or subquery rows are combined per
the normal rules of SQL Boolean expressions. Two rows are considered the normal rules of SQL Boolean expressions. Two rows are considered
equal if all their corresponding members are non-null and equal; the rows equal if all their corresponding members are non-null and equal; the rows
are unequal if any corresponding members are non-null and unequal; are unequal if any corresponding members are non-null and unequal;
...@@ -6153,7 +6153,7 @@ AND ...@@ -6153,7 +6153,7 @@ AND
</para> </para>
<para> <para>
As usual, NULLs in the expressions or subquery rows are combined per As usual, null values in the expressions or subquery rows are combined per
the normal rules of SQL Boolean expressions. Two rows are considered the normal rules of SQL Boolean expressions. Two rows are considered
equal if all their corresponding members are non-null and equal; the rows equal if all their corresponding members are non-null and equal; the rows
are unequal if any corresponding members are non-null and unequal; are unequal if any corresponding members are non-null and unequal;
...@@ -6217,7 +6217,7 @@ AND ...@@ -6217,7 +6217,7 @@ AND
</para> </para>
<para> <para>
As usual, NULLs in the expressions or subquery rows are combined per As usual, null values in the expressions or subquery rows are combined per
the normal rules of SQL Boolean expressions. Two rows are considered the normal rules of SQL Boolean expressions. Two rows are considered
equal if all their corresponding members are non-null and equal; the rows equal if all their corresponding members are non-null and equal; the rows
are unequal if any corresponding members are non-null and unequal; are unequal if any corresponding members are non-null and unequal;
...@@ -6247,7 +6247,7 @@ AND ...@@ -6247,7 +6247,7 @@ AND
</para> </para>
<para> <para>
As usual, NULLs in the expressions or subquery rows are combined per As usual, null values in the expressions or subquery rows are combined per
the normal rules of SQL Boolean expressions. Two rows are considered the normal rules of SQL Boolean expressions. Two rows are considered
equal if all their corresponding members are non-null and equal; the rows equal if all their corresponding members are non-null and equal; the rows
are unequal if any corresponding members are non-null and unequal; are unequal if any corresponding members are non-null and unequal;
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.36 2002/08/13 20:40:43 momjian Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/indices.sgml,v 1.37 2002/09/21 18:32:53 petere Exp $ -->
<chapter id="indexes"> <chapter id="indexes">
<title id="indexes-title">Indexes</title> <title id="indexes-title">Indexes</title>
...@@ -182,7 +182,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> ...@@ -182,7 +182,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
<note> <note>
<para> <para>
Testing has shown PostgreSQL's hash indexes to be similar or slower Testing has shown PostgreSQL's hash indexes to be similar or slower
than btree indexes, and the index size and build time for hash than B-tree indexes, and the index size and build time for hash
indexes is much worse. Hash indexes also suffer poor performance indexes is much worse. Hash indexes also suffer poor performance
under high concurrency. For these reasons, hash index use is under high concurrency. For these reasons, hash index use is
discouraged. discouraged.
...@@ -517,7 +517,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE ...@@ -517,7 +517,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Should not allow NULLs. Should not allow null values.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -540,7 +540,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE ...@@ -540,7 +540,7 @@ Subject: Re: [QUESTIONS] PRIMARY KEY | UNIQUE
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
NULLs are acceptable. Null values are acceptable.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.81 2002/09/18 20:09:31 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.82 2002/09/21 18:32:53 petere Exp $ -->
<chapter id="installation"> <chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]> <title><![%standalone-include[<productname>PostgreSQL</>]]>
...@@ -146,7 +146,7 @@ su - postgres ...@@ -146,7 +146,7 @@ su - postgres
*** You might have to rebuild your Perl installation. Refer to *** You might have to rebuild your Perl installation. Refer to
*** the documentation for details. *** the documentation for details.
</screen> </screen>
(If you don't follow the onscreen output you will merely notice (If you don't follow the on-screen output you will merely notice
the the PL/Perl library object will not be installed.) If you the the PL/Perl library object will not be installed.) If you
see this, you will have to re-build and install see this, you will have to re-build and install
<productname>Perl</productname> manually to be able to build <productname>Perl</productname> manually to be able to build
...@@ -239,7 +239,7 @@ JAVACMD=$JAVA_HOME/bin/java ...@@ -239,7 +239,7 @@ JAVACMD=$JAVA_HOME/bin/java
<para> <para>
To enable Native Language Support (<acronym>NLS</acronym>), that To enable Native Language Support (<acronym>NLS</acronym>), that
is, the ability to display a program's messages in a language is, the ability to display a program's messages in a language
other than English, you need an implementation of the Gettext other than English, you need an implementation of the <application>Gettext</>
<acronym>API</acronym>. Some operating systems have this <acronym>API</acronym>. Some operating systems have this
built-in (e.g., <systemitem class="osname">Linux</>, <systemitem built-in (e.g., <systemitem class="osname">Linux</>, <systemitem
class="osname">NetBSD</>, <systemitem class="osname">NetBSD</>, <systemitem
...@@ -256,7 +256,8 @@ JAVACMD=$JAVA_HOME/bin/java ...@@ -256,7 +256,8 @@ JAVACMD=$JAVA_HOME/bin/java
<listitem> <listitem>
<para> <para>
Kerberos, OpenSSL, or PAM, if you want to support <application>Kerberos</>, <application>OpenSSL</>, or <application>PAM</>,
if you want to support
authentication using these services. authentication using these services.
</para> </para>
</listitem> </listitem>
...@@ -885,7 +886,7 @@ JAVACMD=$JAVA_HOME/bin/java ...@@ -885,7 +886,7 @@ JAVACMD=$JAVA_HOME/bin/java
<term><option>--without-readline</option></term> <term><option>--without-readline</option></term>
<listitem> <listitem>
<para> <para>
Prevents the use of the Readline library. This disables Prevents the use of the <application>Readline</> library. This disables
command-line editing and history in command-line editing and history in
<application>psql</application>, so it is not recommended. <application>psql</application>, so it is not recommended.
</para> </para>
...@@ -896,7 +897,7 @@ JAVACMD=$JAVA_HOME/bin/java ...@@ -896,7 +897,7 @@ JAVACMD=$JAVA_HOME/bin/java
<term><option>--without-zlib</option></term> <term><option>--without-zlib</option></term>
<listitem> <listitem>
<para> <para>
Prevents the use of the Zlib library. This disables Prevents the use of the <application>Zlib</> library. This disables
compression support in <application>pg_dump</application>. compression support in <application>pg_dump</application>.
This option is only intended for those rare systems where this This option is only intended for those rare systems where this
library is not available. library is not available.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.37 2002/09/18 20:09:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.38 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="jdbc"> <chapter id="jdbc">
...@@ -57,9 +57,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.37 2002/09/18 20:09:31 ...@@ -57,9 +57,9 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/jdbc.sgml,v 1.37 2002/09/18 20:09:31
instructions. After installation, the driver should be found in instructions. After installation, the driver should be found in
<filename><replaceable>PREFIX</>/share/java/postgresql.jar</filename>. <filename><replaceable>PREFIX</>/share/java/postgresql.jar</filename>.
The resulting driver will be built for the version of Java you are The resulting driver will be built for the version of Java you are
running. If you build with a 1.1 JDK you will build a version running. If you build with a 1.1 <acronym>JDK</> you will build a version
that supports the JDBC 1 specification, if you build with a Java 2 that supports the JDBC 1 specification, if you build with a Java 2
JDK (e.g., JDK 1.2 or JDK 1.3) you will build a version that <acronym>JDK</> (e.g., <acronym>JDK</> 1.2 or <acronym>JDK</> 1.3) you will build a version that
supports the JDBC 2 specification. supports the JDBC 2 specification.
</para> </para>
</sect2> </sect2>
...@@ -545,7 +545,7 @@ st.close(); ...@@ -545,7 +545,7 @@ st.close();
need to understand the limitations of each method. The need to understand the limitations of each method. The
<type>bytea</type> data type is not well suited for storing very <type>bytea</type> data type is not well suited for storing very
large amounts of binary data. While a column of type large amounts of binary data. While a column of type
<type>bytea</type> can hold upto 1Gig of binary data, it would <type>bytea</type> can hold up to 1 GB of binary data, it would
require a huge amount of memory (<acronym>RAM</acronym>) to require a huge amount of memory (<acronym>RAM</acronym>) to
process such a large value. The Large Object method for process such a large value. The Large Object method for
storing binary data is better suited to storing very large values, storing binary data is better suited to storing very large values,
...@@ -838,7 +838,7 @@ Fastpath fp = ((org.postgresql.Connection)myconn).getFastpathAPI(); ...@@ -838,7 +838,7 @@ Fastpath fp = ((org.postgresql.Connection)myconn).getFastpathAPI();
<formalpara> <formalpara>
<title>Throws:</title> <title>Throws:</title>
<para> <para>
SQLException by Fastpath when initializing for first time <classname>SQLException</> by Fastpath when initializing for first time
</para> </para>
</formalpara> </formalpara>
</listitem> </listitem>
...@@ -1106,7 +1106,7 @@ public void addFunction(String name, ...@@ -1106,7 +1106,7 @@ public void addFunction(String name,
<para> <para>
This adds a function to our look-up table. User code should This adds a function to our look-up table. User code should
use the <function>addFunctions</function> method, which is based upon a query, use the <function>addFunctions</function> method, which is based upon a query,
rather than hard coding the oid. The oid for a function is not rather than hard coding the OID. The OID for a function is not
guaranteed to remain static, even on different servers of the guaranteed to remain static, even on different servers of the
same version. same version.
</para> </para>
...@@ -1118,7 +1118,7 @@ public void addFunctions(ResultSet rs) throws SQLException ...@@ -1118,7 +1118,7 @@ public void addFunctions(ResultSet rs) throws SQLException
</synopsis> </synopsis>
<para> <para>
This takes a <classname>ResultSet</classname> containing two columns. Column 1 This takes a <classname>ResultSet</classname> containing two columns. Column 1
contains the function name, Column 2 the oid. It reads the contains the function name, Column 2 the OID. It reads the
entire <classname>ResultSet</classname>, loading the values into the function table. entire <classname>ResultSet</classname>, loading the values into the function table.
</para> </para>
...@@ -2154,21 +2154,21 @@ public int read(byte buf[], ...@@ -2154,21 +2154,21 @@ public int read(byte buf[],
<para> <para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>buf</term> <term><parameter>buf</></term>
<listitem> <listitem>
<simpara>destination array</simpara> <simpara>destination array</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>off</term> <term><parameter>off</></term>
<listitem> <listitem>
<simpara>offset within array</simpara> <simpara>offset within array</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>len</term> <term><parameter>len</></term>
<listitem> <listitem>
<simpara>number of bytes to read</simpara> <simpara>number of bytes to read</simpara>
</listitem> </listitem>
...@@ -2202,21 +2202,21 @@ public void write(byte buf[], ...@@ -2202,21 +2202,21 @@ public void write(byte buf[],
<para> <para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>buf</term> <term><parameter>buf</></term>
<listitem> <listitem>
<simpara>destination array</simpara> <simpara>destination array</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>off</term> <term><parameter>off</></term>
<listitem> <listitem>
<simpara>offset within array</simpara> <simpara>offset within array</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>len</term> <term><parameter>len</></term>
<listitem> <listitem>
<simpara>number of bytes to write</simpara> <simpara>number of bytes to write</simpara>
</listitem> </listitem>
...@@ -2350,21 +2350,21 @@ lobj = ((org.postgresql.Connection)myconn).getLargeObjectAPI(); ...@@ -2350,21 +2350,21 @@ lobj = ((org.postgresql.Connection)myconn).getLargeObjectAPI();
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>public static final int WRITE</term> <term><literal>public static final int WRITE</></term>
<listitem> <listitem>
<simpara>This mode indicates we want to write to an object.</simpara> <simpara>This mode indicates we want to write to an object.</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>public static final int READ</term> <term><literal>public static final int READ</></term>
<listitem> <listitem>
<simpara>This mode indicates we want to read an object.</simpara> <simpara>This mode indicates we want to read an object.</simpara>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>public static final int READWRITE</term> <term><literal>public static final int READWRITE</></term>
<listitem> <listitem>
<simpara>This mode is the default. It indicates we want read and write access to a large object.</simpara> <simpara>This mode is the default. It indicates we want read and write access to a large object.</simpara>
</listitem> </listitem>
...@@ -2382,8 +2382,8 @@ public LargeObject open(int oid) throws SQLException ...@@ -2382,8 +2382,8 @@ public LargeObject open(int oid) throws SQLException
</synopsis> </synopsis>
<para> <para>
This opens an existing large object, based on its OID. This This opens an existing large object, based on its OID. This
method assumes that READ and WRITE access is required (the method assumes that <symbol>READ</> and
default). <symbol>WRITE</> access is required (the default).
</para> </para>
</listitem> </listitem>
...@@ -2404,7 +2404,7 @@ public int create() throws SQLException ...@@ -2404,7 +2404,7 @@ public int create() throws SQLException
</synopsis> </synopsis>
<para> <para>
This creates a large object, returning its OID. This creates a large object, returning its OID.
It defaults to READWRITE for the new object's attributes. It defaults to <symbol>READWRITE</> for the new object's attributes.
</para> </para>
</listitem> </listitem>
......
...@@ -1038,7 +1038,7 @@ pg_execute <OPTIONAL>-array <REPLACEABLE CLASS="PARAMETER">arrayVar</REPLACEABLE ...@@ -1038,7 +1038,7 @@ pg_execute <OPTIONAL>-array <REPLACEABLE CLASS="PARAMETER">arrayVar</REPLACEABLE
<LISTITEM> <LISTITEM>
<PARA>Specifies the name of an array variable where result tuples are stored, <PARA>Specifies the name of an array variable where result tuples are stored,
indexed by the field names. indexed by the field names.
This is ignored if queryString is not a SELECT statement. For SELECT This is ignored if <replaceable class=parameter>queryString</> is not a SELECT statement. For SELECT
statements, if this option is not used, result tuples values are stored statements, if this option is not used, result tuples values are stored
in individual variables named according to the field names in the result. in individual variables named according to the field names in the result.
</PARA> </PARA>
...@@ -1118,7 +1118,7 @@ The number of tuples affected or returned by the query. ...@@ -1118,7 +1118,7 @@ The number of tuples affected or returned by the query.
If the query is not a SELECT statement, the query is executed and the If the query is not a SELECT statement, the query is executed and the
number of tuples affected by the query is returned. If the query is an number of tuples affected by the query is returned. If the query is an
INSERT and a single tuple is inserted, the OID of the inserted tuple is INSERT and a single tuple is inserted, the OID of the inserted tuple is
stored in the oidVar variable if the optional <PARAMETER>-oid</PARAMETER> stored in the <replaceable>oidVar</> variable if the optional <PARAMETER>-oid</PARAMETER>
argument is supplied. argument is supplied.
</PARA> </PARA>
<PARA> <PARA>
...@@ -1166,7 +1166,7 @@ In the following examples, error checking with <LITERAL>catch</LITERAL> ...@@ -1166,7 +1166,7 @@ In the following examples, error checking with <LITERAL>catch</LITERAL>
has been omitted for clarity. has been omitted for clarity.
</PARA> </PARA>
<PARA> <PARA>
Insert a row and save the OID in result_oid: Insert a row and save the OID in <varname>result_oid</>:
<ProgramListing> <ProgramListing>
pg_execute -oid result_oid $pgconn "insert into mytable values (1)" pg_execute -oid result_oid $pgconn "insert into mytable values (1)"
</ProgramListing> </ProgramListing>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.96 2002/09/05 22:09:42 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.97 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="libpq"> <chapter id="libpq">
...@@ -214,7 +214,7 @@ PGconn *PQconnectdb(const char *conninfo) ...@@ -214,7 +214,7 @@ PGconn *PQconnectdb(const char *conninfo)
environment variable (see <xref linkend="libpq-envars">) environment variable (see <xref linkend="libpq-envars">)
is checked. If the environment variable is not set either, is checked. If the environment variable is not set either,
then hardwired defaults are used. then hardwired defaults are used.
The return value is a pointer to an abstract struct The return value is a pointer to an abstract <type>struct</type>
representing the connection to the backend. representing the connection to the backend.
</para> </para>
</listitem> </listitem>
...@@ -457,7 +457,7 @@ struct PQconninfoOption ...@@ -457,7 +457,7 @@ struct PQconninfoOption
Returns a connection options array. This may Returns a connection options array. This may
be used to determine all possible <function>PQconnectdb</function> options and their be used to determine all possible <function>PQconnectdb</function> options and their
current default values. The return value points to an array of current default values. The return value points to an array of
<structname>PQconninfoOption</structname> structs, which ends with an entry having a NULL <structname>PQconninfoOption</structname> <type>struct</>s, which ends with an entry having a NULL
keyword pointer. Note that the default values (<structfield>val</structfield> fields) keyword pointer. Note that the default values (<structfield>val</structfield> fields)
will depend on environment variables and other context. will depend on environment variables and other context.
Callers must treat the connection options data as read-only. Callers must treat the connection options data as read-only.
...@@ -542,7 +542,7 @@ maintain the <structname>PGconn</structname> abstraction. Use the accessor func ...@@ -542,7 +542,7 @@ maintain the <structname>PGconn</structname> abstraction. Use the accessor func
at the contents of <structname>PGconn</structname>. Avoid directly referencing the fields of the at the contents of <structname>PGconn</structname>. Avoid directly referencing the fields of the
<structname>PGconn</> structure because they are subject to change in the future. <structname>PGconn</> structure because they are subject to change in the future.
(Beginning in <productname>PostgreSQL</productname> release 6.4, the (Beginning in <productname>PostgreSQL</productname> release 6.4, the
definition of struct <structname>PGconn</structname> is not even provided in <filename>libpq-fe.h</filename>. definition of <type>struct PGconn</> is not even provided in <filename>libpq-fe.h</filename>.
If you have old code that accesses <structname>PGconn</structname> fields directly, you can keep using it If you have old code that accesses <structname>PGconn</structname> fields directly, you can keep using it
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
soon.) soon.)
...@@ -757,7 +757,7 @@ maintain the <structname>PGresult</structname> abstraction. Use the accessor fu ...@@ -757,7 +757,7 @@ maintain the <structname>PGresult</structname> abstraction. Use the accessor fu
at the contents of <structname>PGresult</structname>. Avoid directly referencing the fields of the at the contents of <structname>PGresult</structname>. Avoid directly referencing the fields of the
<structname>PGresult</structname> structure because they are subject to change in the future. <structname>PGresult</structname> structure because they are subject to change in the future.
(Beginning in <productname>PostgreSQL</productname> 6.4, the (Beginning in <productname>PostgreSQL</productname> 6.4, the
definition of struct <structname>PGresult</structname> is not even provided in <filename>libpq-fe.h</>. If you definition of <type>struct PGresult</> is not even provided in <filename>libpq-fe.h</>. If you
have old code that accesses <structname>PGresult</structname> fields directly, you can keep using it have old code that accesses <structname>PGresult</structname> fields directly, you can keep using it
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
soon.) soon.)
...@@ -813,7 +813,7 @@ exposes a bug in the client software. ...@@ -813,7 +813,7 @@ exposes a bug in the client software.
<listitem> <listitem>
<para> <para>
<function>PQresStatus</function> <function>PQresStatus</function>
Converts the enumerated type returned by PQresultStatus into Converts the enumerated type returned by <function>PQresultStatus</> into
a string constant describing the status code. a string constant describing the status code.
<synopsis> <synopsis>
char *PQresStatus(ExecStatusType status); char *PQresStatus(ExecStatusType status);
...@@ -868,7 +868,7 @@ This is <application>libpq</>'s internal routine to allocate and initialize an e ...@@ -868,7 +868,7 @@ This is <application>libpq</>'s internal routine to allocate and initialize an e
<structname>PGresult</structname> object. It is exported because some applications find it <structname>PGresult</structname> object. It is exported because some applications find it
useful to generate result objects (particularly objects with error useful to generate result objects (particularly objects with error
status) themselves. If <parameter>conn</parameter> is not NULL and status indicates an error, status) themselves. If <parameter>conn</parameter> is not NULL and status indicates an error,
the connection's current errorMessage is copied into the <structname>PGresult.</structname> the connection's current error message is copied into the <structname>PGresult.</structname>
Note that <function>PQclear</function> should eventually be called on the object, just Note that <function>PQclear</function> should eventually be called on the object, just
as with a <structname>PGresult</structname> returned by <application>libpq</application> itself. as with a <structname>PGresult</structname> returned by <application>libpq</application> itself.
</para> </para>
...@@ -976,7 +976,7 @@ strings overlap. ...@@ -976,7 +976,7 @@ strings overlap.
The <parameter>from</parameter> parameter points to an escaped string The <parameter>from</parameter> parameter points to an escaped string
such as might be returned by <function>PQgetvalue</function> of a such as might be returned by <function>PQgetvalue</function> of a
<type>BYTEA</type> column. <function>PQunescapeBytea</function> converts <type>BYTEA</type> column. <function>PQunescapeBytea</function> converts
this NUL terminated string representation into binary, filling a buffer. this string representation into its binary representation, filling the supplied buffer.
It returns a pointer to the buffer which is NULL on error, and the size It returns a pointer to the buffer which is NULL on error, and the size
of the buffer in <parameter>to_length</parameter>. The pointer may of the buffer in <parameter>to_length</parameter>. The pointer may
subsequently be used as an argument to the function subsequently be used as an argument to the function
...@@ -1092,7 +1092,7 @@ int PQfsize(const PGresult *res, ...@@ -1092,7 +1092,7 @@ int PQfsize(const PGresult *res,
<listitem> <listitem>
<para> <para>
<function>PQbinaryTuples</function> <function>PQbinaryTuples</function>
Returns 1 if the PGresult contains binary tuple data, Returns 1 if the <structname>PGresult</> contains binary tuple data,
0 if it contains ASCII data. 0 if it contains ASCII data.
<synopsis> <synopsis>
int PQbinaryTuples(const PGresult *res); int PQbinaryTuples(const PGresult *res);
...@@ -1392,7 +1392,7 @@ PGresult *PQgetResult(PGconn *conn); ...@@ -1392,7 +1392,7 @@ PGresult *PQgetResult(PGconn *conn);
indicating that the command is done. (If called when no command is indicating that the command is done. (If called when no command is
active, <function>PQgetResult</function> will just return NULL at once.) active, <function>PQgetResult</function> will just return NULL at once.)
Each non-NULL result from <function>PQgetResult</function> should be processed using Each non-NULL result from <function>PQgetResult</function> should be processed using
the same PGresult accessor functions previously described. the same <structname>PGresult</> accessor functions previously described.
Don't forget to free each result object with <function>PQclear</function> when done with it. Don't forget to free each result object with <function>PQclear</function> when done with it.
Note that <function>PQgetResult</function> will block only if a query is active and the Note that <function>PQgetResult</function> will block only if a query is active and the
necessary response data has not yet been read by <function>PQconsumeInput</function>. necessary response data has not yet been read by <function>PQconsumeInput</function>.
...@@ -1606,7 +1606,7 @@ typedef struct { ...@@ -1606,7 +1606,7 @@ typedef struct {
} u; } u;
} PQArgBlock; } PQArgBlock;
</synopsis> </synopsis>
<function>PQfn</function> always returns a valid <structname>PGresult*</structname>. The resultStatus <function>PQfn</function> always returns a valid <structname>PGresult*</structname>. The result status
should be checked before the result is used. The should be checked before the result is used. The
caller is responsible for freeing the <structname>PGresult</structname> with caller is responsible for freeing the <structname>PGresult</structname> with
<function>PQclear</function> when it is no longer needed. <function>PQclear</function> when it is no longer needed.
...@@ -1647,7 +1647,7 @@ messages can be detected by calling <function>PQnotifies</function>. ...@@ -1647,7 +1647,7 @@ messages can be detected by calling <function>PQnotifies</function>.
Returns the next notification from a list of unhandled Returns the next notification from a list of unhandled
notification messages received from the backend. Returns NULL if notification messages received from the backend. Returns NULL if
there are no pending notifications. Once a notification is there are no pending notifications. Once a notification is
returned from PQnotifies, it is considered handled and will be returned from <function>PQnotifies</>, it is considered handled and will be
removed from the list of notifications. removed from the list of notifications.
<synopsis> <synopsis>
PGnotify* PQnotifies(PGconn *conn); PGnotify* PQnotifies(PGconn *conn);
...@@ -1932,7 +1932,7 @@ void PQuntrace(PGconn *conn) ...@@ -1932,7 +1932,7 @@ void PQuntrace(PGconn *conn)
<para> <para>
<function>PQsetNoticeProcessor</function> <function>PQsetNoticeProcessor</function>
<indexterm><primary>notice processor</></> <indexterm><primary>notice processor</></>
Control reporting of notice and warning messages generated by libpq. Control reporting of notice and warning messages generated by <application>libpq</>.
<synopsis> <synopsis>
typedef void (*PQnoticeProcessor) (void *arg, const char *message); typedef void (*PQnoticeProcessor) (void *arg, const char *message);
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.18 2002/09/18 20:09:32 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.19 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="maintenance"> <chapter id="maintenance">
...@@ -380,14 +380,14 @@ VACUUM ...@@ -380,14 +380,14 @@ VACUUM
</indexterm> </indexterm>
<para> <para>
<productname>PostgreSQL</productname> is unable to reuse btree index <productname>PostgreSQL</productname> is unable to reuse B-tree index
pages in certain cases. The problem is that if indexed rows are pages in certain cases. The problem is that if indexed rows are
deleted, those index pages can only be reused by rows with similar deleted, those index pages can only be reused by rows with similar
values. For example, if indexed rows are deleted and newly values. For example, if indexed rows are deleted and newly
inserted/updated rows have much higher values, the new rows can't use inserted/updated rows have much higher values, the new rows can't use
the index space made available by the deleted rows. Instead, such the index space made available by the deleted rows. Instead, such
new rows must be placed on new index pages. In such cases, disk new rows must be placed on new index pages. In such cases, disk
space used by the index will grow indefinately, even if space used by the index will grow indefinitely, even if
<command>VACUUM</> is run frequently. <command>VACUUM</> is run frequently.
</para> </para>
<para> <para>
...@@ -426,7 +426,7 @@ VACUUM ...@@ -426,7 +426,7 @@ VACUUM
The simplest production-grade approach to managing log output is to The simplest production-grade approach to managing log output is to
send it all to <application>syslog</> and let send it all to <application>syslog</> and let
<application>syslog</> deal with file rotation. To do this, set <application>syslog</> deal with file rotation. To do this, set
<literal>syslog</> to 2 (log to syslog only) in <literal>syslog</> to 2 (log to <application>syslog</> only) in
<filename>postgresql.conf</>. Then you can send a <filename>postgresql.conf</>. Then you can send a
<literal>SIGHUP</literal> signal to the <application>syslog</> <literal>SIGHUP</literal> signal to the <application>syslog</>
daemon whenever you want to force it to start writing a new log daemon whenever you want to force it to start writing a new log
...@@ -434,7 +434,7 @@ VACUUM ...@@ -434,7 +434,7 @@ VACUUM
</para> </para>
<para> <para>
On many systems, however, syslog is not very reliable, particularly On many systems, however, <application>syslog</> is not very reliable, particularly
with large log messages; it may truncate or drop messages just when with large log messages; it may truncate or drop messages just when
you need them the most. You may find it more useful to pipe the you need them the most. You may find it more useful to pipe the
<application>postmaster</>'s <systemitem>stderr</> to some type of <application>postmaster</>'s <systemitem>stderr</> to some type of
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.13 2002/08/31 17:14:27 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/monitoring.sgml,v 1.14 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="monitoring"> <chapter id="monitoring">
...@@ -172,7 +172,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -172,7 +172,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
Each individual server process transmits new access counts to the collector Each individual server process transmits new access counts to the collector
just before waiting for another client command; so a query still in just before waiting for another client command; so a query still in
progress does not affect the displayed totals. Also, the collector itself progress does not affect the displayed totals. Also, the collector itself
emits new totals at most once per PGSTAT_STAT_INTERVAL (500 milliseconds emits new totals at most once per <varname>pgstat_stat_interval</varname> (500 milliseconds
by default). So the displayed totals lag behind actual activity. by default). So the displayed totals lag behind actual activity.
</para> </para>
...@@ -204,7 +204,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -204,7 +204,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<tbody> <tbody>
<row> <row>
<entry><structname>pg_stat_activity</></entry> <entry><structname>pg_stat_activity</></entry>
<entry>One row per server process, showing process PID, database, <entry>One row per server process, showing process <acronym>PID</>, database,
user, and current query. The current query column is only available user, and current query. The current query column is only available
to superusers; for others it reads as NULL. (Note that because of to superusers; for others it reads as NULL. (Note that because of
the collector's reporting delay, current query will only be up-to-date the collector's reporting delay, current query will only be up-to-date
...@@ -274,13 +274,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -274,13 +274,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row> <row>
<entry><structname>pg_statio_sys_tables</></entry> <entry><structname>pg_statio_sys_tables</></entry>
<entry>Same as pg_statio_all_tables, except that only system tables <entry>Same as <structname>pg_statio_all_tables</>, except that only system tables
are shown.</entry> are shown.</entry>
</row> </row>
<row> <row>
<entry><structname>pg_statio_user_tables</></entry> <entry><structname>pg_statio_user_tables</></entry>
<entry>Same as pg_statio_all_tables, except that only user tables <entry>Same as <structname>pg_statio_all_tables</>, except that only user tables
are shown.</entry> are shown.</entry>
</row> </row>
...@@ -293,13 +293,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -293,13 +293,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row> <row>
<entry><structname>pg_statio_sys_indexes</></entry> <entry><structname>pg_statio_sys_indexes</></entry>
<entry>Same as pg_statio_all_indexes, except that only indexes on <entry>Same as <structname>pg_statio_all_indexes</>, except that only indexes on
system tables are shown.</entry> system tables are shown.</entry>
</row> </row>
<row> <row>
<entry><structname>pg_statio_user_indexes</></entry> <entry><structname>pg_statio_user_indexes</></entry>
<entry>Same as pg_statio_all_indexes, except that only indexes on <entry>Same as <structname>pg_statio_all_indexes</>, except that only indexes on
user tables are shown.</entry> user tables are shown.</entry>
</row> </row>
...@@ -312,14 +312,14 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -312,14 +312,14 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row> <row>
<entry><structname>pg_statio_sys_sequences</></entry> <entry><structname>pg_statio_sys_sequences</></entry>
<entry>Same as pg_statio_all_sequences, except that only system <entry>Same as <structname>pg_statio_all_sequences</>, except that only system
sequences are shown. (Presently, no system sequences are defined, sequences are shown. (Presently, no system sequences are defined,
so this view is always empty.)</entry> so this view is always empty.)</entry>
</row> </row>
<row> <row>
<entry><structname>pg_statio_user_sequences</></entry> <entry><structname>pg_statio_user_sequences</></entry>
<entry>Same as pg_statio_all_sequences, except that only user <entry>Same as <structname>pg_statio_all_sequences</>, except that only user
sequences are shown.</entry> sequences are shown.</entry>
</row> </row>
</tbody> </tbody>
...@@ -540,7 +540,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re ...@@ -540,7 +540,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<para> <para>
The function <function>pg_stat_get_backend_idset</function> provides The function <function>pg_stat_get_backend_idset</function> provides
a convenient way to generate one row for each active backend. For a convenient way to generate one row for each active backend. For
example, to show the PIDs and current queries of all backends: example, to show the <acronym>PID</>s and current queries of all backends:
<programlisting> <programlisting>
SELECT pg_stat_get_backend_pid(S.backendid) AS procpid, SELECT pg_stat_get_backend_pid(S.backendid) AS procpid,
...@@ -657,10 +657,10 @@ FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S; ...@@ -657,10 +657,10 @@ FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S;
<entry><structfield>transaction</structfield></entry> <entry><structfield>transaction</structfield></entry>
<entry><type>xid</type></entry> <entry><type>xid</type></entry>
<entry>The ID of a transaction, or NULL if the lockable object <entry>The ID of a transaction, or NULL if the lockable object
is a relation. Every transaction holds ExclusiveLock on its is a relation. Every transaction holds an exclusive lock on its
transaction ID for its entire duration. If one transaction finds transaction ID for its entire duration. If one transaction finds
it necessary to wait specifically for another transaction, it it necessary to wait specifically for another transaction, it
does so by attempting to acquire ShareLock on the other transaction does so by attempting to acquire share lock on the other transaction
ID. That will succeed only when the other transaction terminates ID. That will succeed only when the other transaction terminates
and releases its locks. and releases its locks.
</entry> </entry>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.27 2002/08/17 13:04:14 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/mvcc.sgml,v 2.28 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="mvcc"> <chapter id="mvcc">
...@@ -498,7 +498,7 @@ ERROR: Can't serialize access due to concurrent update ...@@ -498,7 +498,7 @@ ERROR: Can't serialize access due to concurrent update
EXCLUSIVE</literal>, <literal>EXCLUSIVE</literal>, and EXCLUSIVE</literal>, <literal>EXCLUSIVE</literal>, and
<literal>ACCESS EXCLUSIVE</literal> lock modes. <literal>ACCESS EXCLUSIVE</literal> lock modes.
This mode protects a table against This mode protects a table against
concurrent schema changes and VACUUMs. concurrent schema changes and <command>VACUUM</> runs.
</para> </para>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.20 2002/03/24 17:11:37 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.21 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="performance-tips"> <chapter id="performance-tips">
...@@ -527,11 +527,11 @@ regression=# ...@@ -527,11 +527,11 @@ regression=#
</sect1> </sect1>
<sect1 id="explicit-joins"> <sect1 id="explicit-joins">
<title>Controlling the Planner with Explicit JOINs</title> <title>Controlling the Planner with Explicit <literal>JOIN</> Clauses</title>
<para> <para>
Beginning with <productname>PostgreSQL</productname> 7.1 it is possible Beginning with <productname>PostgreSQL</productname> 7.1 it is possible
to control the query planner to some extent by using explicit JOIN to control the query planner to some extent by using explicit <literal>JOIN</>
syntax. To see why this matters, we first need some background. syntax. To see why this matters, we first need some background.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.17 2002/09/18 20:09:32 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/plperl.sgml,v 2.18 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="plperl"> <chapter id="plperl">
...@@ -162,7 +162,7 @@ SELECT name, empcomp(employee) FROM employee; ...@@ -162,7 +162,7 @@ SELECT name, empcomp(employee) FROM employee;
Access to the database itself from your Perl function can be done via Access to the database itself from your Perl function can be done via
an experimental module <ulink an experimental module <ulink
url="http://www.cpan.org/modules/by-module/DBD/APILOS/"><literal>DBD::PgSPI</literal></ulink> url="http://www.cpan.org/modules/by-module/DBD/APILOS/"><literal>DBD::PgSPI</literal></ulink>
(also available at <ulink url="http://www.cpan.org/SITES.html">CPAN (also available at <ulink url="http://www.cpan.org/SITES.html"><acronym>CPAN</>
mirror sites</ulink>). This module makes available a mirror sites</ulink>). This module makes available a
<acronym>DBI</>-compliant database-handle named <acronym>DBI</>-compliant database-handle named
<varname>$pg_dbh</varname> that can be used to perform queries <varname>$pg_dbh</varname> that can be used to perform queries
...@@ -230,14 +230,14 @@ CREATE FUNCTION badfunc() RETURNS integer AS ' ...@@ -230,14 +230,14 @@ CREATE FUNCTION badfunc() RETURNS integer AS '
restricted --- for example, one might want a Perl function that restricted --- for example, one might want a Perl function that
sends mail. To handle these cases, PL/Perl can also be installed sends mail. To handle these cases, PL/Perl can also be installed
as an <quote>untrusted</> language (usually called as an <quote>untrusted</> language (usually called
<quote>PL/PerlU</quote>). In this case the full Perl language is <application>PL/PerlU</application>). In this case the full Perl language is
available. If the <command>createlang</command> program is used to available. If the <command>createlang</command> program is used to
install the language, the language name <literal>plperlu</literal> install the language, the language name <literal>plperlu</literal>
will select the untrusted PL/Perl variant. will select the untrusted PL/Perl variant.
</para> </para>
<para> <para>
The writer of a PL/PerlU function must take care that the function The writer of a <application>PL/PerlU</> function must take care that the function
cannot be used to do anything unwanted, since it will be able to do cannot be used to do anything unwanted, since it will be able to do
anything that could be done by a user logged in as the database anything that could be done by a user logged in as the database
administrator. Note that the database system allows only database administrator. Note that the database system allows only database
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.7 2002/09/14 20:11:16 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.8 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="plpgsql"> <chapter id="plpgsql">
...@@ -126,7 +126,7 @@ END; ...@@ -126,7 +126,7 @@ END;
The <application>PL/pgSQL</application> EXECUTE statement is not The <application>PL/pgSQL</application> EXECUTE statement is not
related to the EXECUTE statement supported by the related to the EXECUTE statement supported by the
<productname>PostgreSQL</productname> backend. The backend <productname>PostgreSQL</productname> backend. The backend
EXECUTE statement cannot be used within PL/PgSQL functions (and EXECUTE statement cannot be used within <application>PL/pgSQL</> functions (and
is not needed). is not needed).
</para> </para>
</note> </note>
...@@ -849,7 +849,7 @@ SELECT INTO <replaceable>target</replaceable> <replaceable>expressions</replacea ...@@ -849,7 +849,7 @@ SELECT INTO <replaceable>target</replaceable> <replaceable>expressions</replacea
</para> </para>
<para> <para>
If the SELECT query returns zero rows, NULLs are assigned to the If the SELECT query returns zero rows, null values are assigned to the
target(s). If the SELECT query returns multiple rows, the first target(s). If the SELECT query returns multiple rows, the first
row is assigned to the target(s) and the rest are discarded. row is assigned to the target(s) and the rest are discarded.
(Note that <quote>the first row</> is not well-defined unless you've (Note that <quote>the first row</> is not well-defined unless you've
...@@ -877,8 +877,8 @@ IF NOT FOUND THEN ...@@ -877,8 +877,8 @@ IF NOT FOUND THEN
END IF; END IF;
</programlisting> </programlisting>
Alternatively, you can use the IS NULL (or ISNULL) conditional to Alternatively, you can use the <literal>IS NULL</literal> (or <literal>ISNULL</>) conditional to
test for NULLity of a RECORD/ROW result. Note that there is no test for whether a RECORD/ROW result is null. Note that there is no
way to tell whether any additional rows might have been discarded. way to tell whether any additional rows might have been discarded.
</para> </para>
...@@ -1205,7 +1205,7 @@ RETURN NEXT <replaceable>expression</replaceable>; ...@@ -1205,7 +1205,7 @@ RETURN NEXT <replaceable>expression</replaceable>;
RETURN NEXT does not actually return from the function; it simply RETURN NEXT does not actually return from the function; it simply
saves away the value of the expression (or record or row variable, saves away the value of the expression (or record or row variable,
as appropriate for the datatype being returned). as appropriate for the data type being returned).
Execution then continues with the next statement in the Execution then continues with the next statement in the
<application>PL/pgSQL</> function. As successive RETURN NEXT <application>PL/pgSQL</> function. As successive RETURN NEXT
commands are executed, the result set is built up. A final commands are executed, the result set is built up. A final
...@@ -1215,17 +1215,17 @@ RETURN NEXT <replaceable>expression</replaceable>; ...@@ -1215,17 +1215,17 @@ RETURN NEXT <replaceable>expression</replaceable>;
<note> <note>
<para> <para>
The current implementation of RETURN NEXT for PL/PgSQL stores The current implementation of RETURN NEXT for
the entire result set before returning from the function, as <application>PL/pgSQL</> stores the entire result set before
discussed above. That means that if a PL/PgSQL function returning from the function, as discussed above. That means that
produces a very large result set, performance may be poor: data if a <application>PL/pgSQL</> function produces a very large result set,
will be written to disk to avoid memory exhaustion, but the performance may be poor: data will be written to disk to avoid
function itself will not return until the entire memory exhaustion, but the function itself will not return until
result set has been generated. A future version of PL/PgSQL may the entire result set has been generated. A future version of
allow users to allow users to define set-returning functions <application>PL/pgSQL</> may allow users to allow users to define set-returning
that do not have this limitation. Currently, the point at which functions that do not have this limitation. Currently, the point
data begins being written to disk is controlled by the at which data begins being written to disk is controlled by the
<option>SORT_MEM</> configuration variable. Administrators who <varname>SORT_MEM</> configuration variable. Administrators who
have sufficient memory to store larger result sets in memory have sufficient memory to store larger result sets in memory
should consider increasing this parameter. should consider increasing this parameter.
</para> </para>
...@@ -1236,14 +1236,27 @@ RETURN NEXT <replaceable>expression</replaceable>; ...@@ -1236,14 +1236,27 @@ RETURN NEXT <replaceable>expression</replaceable>;
<title>Conditionals</title> <title>Conditionals</title>
<para> <para>
<function>IF</function> statements let you execute commands based on <literal>IF</> statements let you execute commands based on
certain conditions. certain conditions. <application>PL/pgSQL</> has four forms of
<application>PL/pgSQL</> has four forms of IF: IF-THEN, IF-THEN-ELSE, <literal>IF</>:
IF-THEN-ELSE IF, and IF-THEN-ELSIF-THEN-ELSE. <itemizedlist>
<listitem>
<para><literal>IF ... THEN</></>
</listitem>
<listitem>
<para><literal>IF ... THEN ... ELSE</></>
</listitem>
<listitem>
<para><literal>IF ... THEN ... ELSE IF</> and</>
</listitem>
<listitem>
<para><literal>IF ... THEN ... ELSIF ... THEN ... ELSE</></>
</listitem>
</itemizedlist>
</para> </para>
<sect3> <sect3>
<title>IF-THEN</title> <title><literal>IF-THEN</></title>
<para> <para>
<synopsis> <synopsis>
...@@ -1265,7 +1278,7 @@ END IF; ...@@ -1265,7 +1278,7 @@ END IF;
</sect3> </sect3>
<sect3> <sect3>
<title>IF-THEN-ELSE</title> <title><literal>IF-THEN-ELSE</></title>
<para> <para>
<synopsis> <synopsis>
...@@ -1300,7 +1313,7 @@ END IF; ...@@ -1300,7 +1313,7 @@ END IF;
</sect3> </sect3>
<sect3> <sect3>
<title>IF-THEN-ELSE IF</title> <title><literal>IF-THEN-ELSE IF</></title>
<para> <para>
IF statements can be nested, as in the following example: IF statements can be nested, as in the following example:
...@@ -1326,7 +1339,7 @@ END IF; ...@@ -1326,7 +1339,7 @@ END IF;
</sect3> </sect3>
<sect3> <sect3>
<title>IF-THEN-ELSIF-ELSE</title> <title><literal>IF-THEN-ELSIF-ELSE</></title>
<para> <para>
<synopsis> <synopsis>
...@@ -1344,10 +1357,11 @@ IF <replaceable>boolean-expression</replaceable> THEN ...@@ -1344,10 +1357,11 @@ IF <replaceable>boolean-expression</replaceable> THEN
END IF; END IF;
</synopsis> </synopsis>
IF-THEN-ELSIF-ELSE provides a more convenient method of checking <literal>IF-THEN-ELSIF-ELSE</> provides a more convenient
many alternatives in one statement. Formally it is equivalent method of checking many alternatives in one statement.
to nested IF-THEN-ELSE-IF-THEN commands, but only one END IF Formally it is equivalent to nested
is needed. <literal>IF-THEN-ELSE-IF-THEN</> commands, but only one
<literal>END IF</> is needed.
</para> </para>
<para> <para>
...@@ -1673,7 +1687,7 @@ OPEN <replaceable>unbound-cursor</replaceable> FOR SELECT ...; ...@@ -1673,7 +1687,7 @@ OPEN <replaceable>unbound-cursor</replaceable> FOR SELECT ...;
to execute. The cursor cannot be open already, and it must to execute. The cursor cannot be open already, and it must
have been declared as an unbound cursor (that is, as a simple have been declared as an unbound cursor (that is, as a simple
<type>refcursor</> variable). The SELECT query is treated <type>refcursor</> variable). The SELECT query is treated
in the same way as other SELECTs in <application>PL/pgSQL</>: in the same way as other SELECT statements in <application>PL/pgSQL</>:
<application>PL/pgSQL</> variable names are substituted, <application>PL/pgSQL</> variable names are substituted,
and the query plan is cached for possible re-use. and the query plan is cached for possible re-use.
...@@ -1706,7 +1720,7 @@ OPEN curs1 FOR EXECUTE ''SELECT * FROM '' || quote_ident($1); ...@@ -1706,7 +1720,7 @@ OPEN curs1 FOR EXECUTE ''SELECT * FROM '' || quote_ident($1);
</sect3> </sect3>
<sect3> <sect3>
<title>OPENing a bound cursor</title> <title>Opening a bound cursor</title>
<para> <para>
<synopsis> <synopsis>
...@@ -1802,7 +1816,7 @@ CLOSE curs1; ...@@ -1802,7 +1816,7 @@ CLOSE curs1;
caller. This is used to return multiple rows or columns from the caller. This is used to return multiple rows or columns from the
function. The function opens the cursor and returns the cursor function. The function opens the cursor and returns the cursor
name to the caller. The caller can then FETCH rows from the name to the caller. The caller can then FETCH rows from the
cursor. The cursor can be CLOSEd by the caller, or it will be cursor. The cursor can be closed by the caller, or it will be
closed automatically when the transaction closes. closed automatically when the transaction closes.
</para> </para>
...@@ -2067,7 +2081,7 @@ RAISE EXCEPTION ''Inexistent ID --> %'',user_id; ...@@ -2067,7 +2081,7 @@ RAISE EXCEPTION ''Inexistent ID --> %'',user_id;
Data type array of <type>text</type>; the arguments from Data type array of <type>text</type>; the arguments from
the <command>CREATE TRIGGER</command> statement. the <command>CREATE TRIGGER</command> statement.
The index counts from 0 and can be given as an expression. Invalid The index counts from 0 and can be given as an expression. Invalid
indices (&lt; 0 or &gt;= tg_nargs) result in a NULL value. indices (&lt; 0 or &gt;= <varname>tg_nargs</>) result in a null value.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -2387,7 +2401,7 @@ LANGUAGE 'plpgsql'; ...@@ -2387,7 +2401,7 @@ LANGUAGE 'plpgsql';
<row> <row>
<entry>2</entry> <entry>2</entry>
<entry>In assignments, SELECTs, to delimit strings, etc.</entry> <entry>In assignments, SELECT statements, to delimit strings, etc.</entry>
<entry><programlisting> <entry><programlisting>
a_output := ''Blah''; a_output := ''Blah'';
SELECT * FROM users WHERE f_name=''foobar''; SELECT * FROM users WHERE f_name=''foobar'';
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.11 2002/09/18 20:09:32 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/plpython.sgml,v 1.12 2002/09/21 18:32:53 petere Exp $ -->
<chapter id="plpython"> <chapter id="plpython">
<title>PL/Python - Python Procedural Language</title> <title>PL/Python - Python Procedural Language</title>
...@@ -221,9 +221,12 @@ plan = plpy.prepare("SOME OTHER QUERY") ...@@ -221,9 +221,12 @@ plan = plpy.prepare("SOME OTHER QUERY")
execution environment, further restricts it to prevent the use of execution environment, further restricts it to prevent the use of
the file <function>open</> call, and allows only modules from a the file <function>open</> call, and allows only modules from a
specific list to be imported. Presently, that list includes: specific list to be imported. Presently, that list includes:
array, bisect, binascii, calendar, cmath, codecs, errno, marshal, <literal>array</>, <>bisect</>, <>binascii</>, <>calendar</>,
math, md5, mpz, operator, pcre, pickle, random, re, regex, sre, <>cmath</>, <>codecs</>, <>errno</>, <>marshal</>, <>math</>,
sha, string, StringIO, struct, time, whrandom, and zlib. <>md5</>, <>mpz</>, <>operator</>, <>pcre</>, <>pickle</>,
<>random</>, <>re</>, <>regex</>, <>sre</>, <>sha</>, <>string</>,
<>StringIO</>, <>struct</>, <>time</>, <>whrandom</>, and
<>zlib</>.
</para> </para>
</sect1> </sect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.21 2002/08/22 00:01:40 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.22 2002/09/21 18:32:53 petere Exp $
--> -->
<chapter id="pltcl"> <chapter id="pltcl">
...@@ -50,22 +50,22 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.21 2002/08/22 00:01:40 tgl E ...@@ -50,22 +50,22 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.21 2002/08/22 00:01:40 tgl E
<para> <para>
Sometimes it is desirable to write Tcl functions that are not restricted Sometimes it is desirable to write Tcl functions that are not restricted
to safe Tcl --- for example, one might want a Tcl function that sends to safe Tcl --- for example, one might want a Tcl function that sends
mail. To handle these cases, there is a variant of PL/Tcl called PL/TclU mail. To handle these cases, there is a variant of <application>PL/Tcl</> called <literal>PL/TclU</>
(for untrusted Tcl). This is the exact same language except that a full (for untrusted Tcl). This is the exact same language except that a full
Tcl interpreter is used. <emphasis>If PL/TclU is used, it must be Tcl interpreter is used. <emphasis>If <application>PL/TclU</> is used, it must be
installed as an untrusted procedural language</emphasis> so that only installed as an untrusted procedural language</emphasis> so that only
database superusers can create functions in it. The writer of a PL/TclU database superusers can create functions in it. The writer of a <application>PL/TclU</>
function must take care that the function cannot be used to do anything function must take care that the function cannot be used to do anything
unwanted, since it will be able to do anything that could be done by unwanted, since it will be able to do anything that could be done by
a user logged in as the database administrator. a user logged in as the database administrator.
</para> </para>
<para> <para>
The shared object for the PL/Tcl and PL/TclU call handlers is The shared object for the <application>PL/Tcl</> and <application>PL/TclU</> call handlers is
automatically built and installed in the automatically built and installed in the
<productname>PostgreSQL</productname> <productname>PostgreSQL</productname>
library directory if Tcl/Tk support is specified library directory if Tcl/Tk support is specified
in the configuration step of the installation procedure. To install in the configuration step of the installation procedure. To install
PL/Tcl and/or PL/TclU in a particular database, use the <application>PL/Tcl</> and/or <application>PL/TclU</> in a particular database, use the
<filename>createlang</filename> script, for example <filename>createlang</filename> script, for example
<literal>createlang pltcl <replaceable>dbname</></literal> or <literal>createlang pltcl <replaceable>dbname</></literal> or
<literal>createlang pltclu <replaceable>dbname</></literal>. <literal>createlang pltclu <replaceable>dbname</></literal>.
...@@ -81,7 +81,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.21 2002/08/22 00:01:40 tgl E ...@@ -81,7 +81,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v 2.21 2002/08/22 00:01:40 tgl E
<title>PL/Tcl Functions and Arguments</title> <title>PL/Tcl Functions and Arguments</title>
<para> <para>
To create a function in the PL/Tcl language, use the standard syntax To create a function in the <application>PL/Tcl</> language, use the standard syntax
<programlisting> <programlisting>
CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS ' CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS '
...@@ -89,8 +89,8 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types ...@@ -89,8 +89,8 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types
' LANGUAGE 'pltcl'; ' LANGUAGE 'pltcl';
</programlisting> </programlisting>
PL/TclU is the same, except that the language should be specified as <application>PL/TclU</> is the same, except that the language should be specified as
<literal>'pltclu'</>. <literal>pltclu</>.
</para> </para>
<para> <para>
...@@ -197,7 +197,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS ' ...@@ -197,7 +197,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS '
all PL/Tcl procedures executed in one backend share the same all PL/Tcl procedures executed in one backend share the same
safe Tcl interpreter. So, any global Tcl variable is accessible to safe Tcl interpreter. So, any global Tcl variable is accessible to
all PL/Tcl procedure calls, and will persist for the duration of the all PL/Tcl procedure calls, and will persist for the duration of the
SQL client connection. (Note that PL/TclU functions likewise share SQL client connection. (Note that <application>PL/TclU</> functions likewise share
global data, but they are in a different Tcl interpreter and cannot global data, but they are in a different Tcl interpreter and cannot
communicate with PL/Tcl functions.) communicate with PL/Tcl functions.)
</para> </para>
...@@ -248,7 +248,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS ' ...@@ -248,7 +248,7 @@ CREATE FUNCTION overpaid_2 (EMP) RETURNS bool AS '
setting up the query as a cursor and then saying <literal>FETCH n</>. setting up the query as a cursor and then saying <literal>FETCH n</>.
</para> </para>
<para> <para>
If the query is a SELECT statement, the values of the SELECT's If the query is a <literal>SELECT</> statement, the values of the statement's
result columns are placed into Tcl variables named after the columns. result columns are placed into Tcl variables named after the columns.
If the <literal>-array</> option is given, the column values are If the <literal>-array</> option is given, the column values are
instead stored into the named associative array, with the SELECT instead stored into the named associative array, with the SELECT
...@@ -267,7 +267,7 @@ spi_exec "SELECT count(*) AS cnt FROM pg_proc" ...@@ -267,7 +267,7 @@ spi_exec "SELECT count(*) AS cnt FROM pg_proc"
</programlisting> </programlisting>
will set the Tcl variable <literal>$cnt</> to the number of rows in will set the Tcl variable <literal>$cnt</> to the number of rows in
the pg_proc system catalog. the <structname>pg_proc</> system catalog.
</para> </para>
<para> <para>
If the optional <replaceable>loop-body</> argument is given, it is If the optional <replaceable>loop-body</> argument is given, it is
...@@ -337,7 +337,7 @@ spi_exec -array C "SELECT * FROM pg_class" { ...@@ -337,7 +337,7 @@ spi_exec -array C "SELECT * FROM pg_class" {
<para> <para>
The optional value for <literal>-nulls</> is a string of spaces and The optional value for <literal>-nulls</> is a string of spaces and
<literal>'n'</> characters telling <function>spi_execp</function> <literal>'n'</> characters telling <function>spi_execp</function>
which of the arguments are NULLs. If given, it must have exactly the which of the arguments are null values. If given, it must have exactly the
same length as the <replaceable>value-list</replaceable>. If it same length as the <replaceable>value-list</replaceable>. If it
is not given, all the argument values are non-NULL. is not given, all the argument values are non-NULL.
</para> </para>
...@@ -504,7 +504,7 @@ SELECT 'doesn''t' AS ret ...@@ -504,7 +504,7 @@ SELECT 'doesn''t' AS ret
<listitem> <listitem>
<para> <para>
A Tcl list of the table field names, prefixed with an empty list A Tcl list of the table field names, prefixed with an empty list
element. So looking up an element name in the list with Tcl's element. So looking up an element name in the list with <application>Tcl</>'s
<function>lsearch</> command returns the element's number starting <function>lsearch</> command returns the element's number starting
with 1 for the first column, the same way the fields are customarily with 1 for the first column, the same way the fields are customarily
numbered in <productname>PostgreSQL</productname>. numbered in <productname>PostgreSQL</productname>.
...@@ -639,7 +639,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab ...@@ -639,7 +639,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab
While the <literal>unknown</> module could actually contain any While the <literal>unknown</> module could actually contain any
initialization script you need, it normally defines a Tcl initialization script you need, it normally defines a Tcl
<quote>unknown</> procedure that is invoked whenever Tcl does <quote>unknown</> procedure that is invoked whenever Tcl does
not recognize an invoked procedure name. PL/Tcl's standard version not recognize an invoked procedure name. <application>PL/Tcl</>'s standard version
of this procedure tries to find a module in <literal>pltcl_modules</> of this procedure tries to find a module in <literal>pltcl_modules</>
that will define the required procedure. If one is found, it is that will define the required procedure. If one is found, it is
loaded into the interpreter, and then execution is allowed to loaded into the interpreter, and then execution is allowed to
...@@ -674,7 +674,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab ...@@ -674,7 +674,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab
differ. Tcl, however, requires all procedure names to be distinct. differ. Tcl, however, requires all procedure names to be distinct.
PL/Tcl deals with this by making the internal Tcl procedure names contain PL/Tcl deals with this by making the internal Tcl procedure names contain
the object the object
ID of the procedure's pg_proc row as part of their name. Thus, ID of the procedure's <structname>pg_proc</> row as part of their name. Thus,
<productname>PostgreSQL</productname> functions with the same name <productname>PostgreSQL</productname> functions with the same name
and different argument types will be different Tcl procedures too. This and different argument types will be different Tcl procedures too. This
is not normally a concern for a PL/Tcl programmer, but it might be visible is not normally a concern for a PL/Tcl programmer, but it might be visible
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.41 2002/09/18 20:07:15 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/programmer.sgml,v 1.42 2002/09/21 18:32:53 petere Exp $
PostgreSQL Programmer's Guide. PostgreSQL Programmer's Guide.
--> -->
...@@ -60,7 +60,6 @@ PostgreSQL Programmer's Guide. ...@@ -60,7 +60,6 @@ PostgreSQL Programmer's Guide.
&rules; &rules;
&xindex; &xindex;
&indexcost; &indexcost;
&gist;
&trigger; &trigger;
&spi; &spi;
</part> </part>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.49 2002/08/15 02:59:18 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.50 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -249,7 +249,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable> ...@@ -249,7 +249,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
<para> <para>
These forms change whether a column is marked to allow NULL These forms change whether a column is marked to allow NULL
values or to reject NULL values. You may only <literal>SET NOT NULL</> values or to reject NULL values. You may only <literal>SET NOT NULL</>
when the table contains no NULLs in the column. when the table contains no null values in the column.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -279,7 +279,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable> ...@@ -279,7 +279,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
compressible data. <literal>EXTERNAL</literal> is for external, compressible data. <literal>EXTERNAL</literal> is for external,
uncompressed data and <literal>EXTENDED</literal> is for external, uncompressed data and <literal>EXTENDED</literal> is for external,
compressed data. <literal>EXTENDED</literal> is the default for all compressed data. <literal>EXTENDED</literal> is the default for all
datatypes that support it. The use of <literal>EXTERNAL</literal> will data types that support it. The use of <literal>EXTERNAL</literal> will
make substring operations on a TEXT column faster, at the penalty of make substring operations on a TEXT column faster, at the penalty of
increased storage space. increased storage space.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.22 2002/05/17 01:19:16 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.23 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -226,7 +226,7 @@ ALTER USER manuel VALID UNTIL 'Jan 31 2030'; ...@@ -226,7 +226,7 @@ ALTER USER manuel VALID UNTIL 'Jan 31 2030';
<para> <para>
Change a user's valid until date, specifying that his Change a user's valid until date, specifying that his
authorization should expire at midday on 4th May 1998 using authorization should expire at midday on 4th May 1998 using
the time zone which is one hour ahead of UTC: the time zone which is one hour ahead of <acronym>UTC</>:
<programlisting> <programlisting>
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1'; ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
</programlisting> </programlisting>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.19 2002/08/30 22:45:25 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/begin.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -125,7 +125,7 @@ WARNING: BEGIN: already a transaction in progress ...@@ -125,7 +125,7 @@ WARNING: BEGIN: already a transaction in progress
Guide</citetitle> for details.) Guide</citetitle> for details.)
In SERIALIZABLE mode queries will see only changes committed before In SERIALIZABLE mode queries will see only changes committed before
the entire the entire
transaction began (actually, before execution of the first DML statement transaction began (actually, before execution of the first <acronym>DML</> statement
in the transaction). in the transaction).
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.19 2002/08/11 02:43:57 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -169,7 +169,7 @@ SELECT <replaceable class="parameter">columnlist</replaceable> INTO TABLE <repla ...@@ -169,7 +169,7 @@ SELECT <replaceable class="parameter">columnlist</replaceable> INTO TABLE <repla
which uses the <productname>PostgreSQL</productname> sorting code in which uses the <productname>PostgreSQL</productname> sorting code in
the ORDER BY clause to create the desired order; this is usually much the ORDER BY clause to create the desired order; this is usually much
faster than an indexscan for faster than an index scan for
unordered data. You then drop the old table, use unordered data. You then drop the old table, use
<command>ALTER TABLE...RENAME</command> <command>ALTER TABLE...RENAME</command>
to rename <replaceable class="parameter">newtable</replaceable> to the old name, and to rename <replaceable class="parameter">newtable</replaceable> to the old name, and
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.3 2002/09/05 22:05:50 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.4 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -71,8 +71,8 @@ PostgreSQL documentation ...@@ -71,8 +71,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-d <replaceable class="parameter">dbname</replaceable></term> <term><option>-d <replaceable class="parameter">dbname</replaceable></></term>
<term>--dbname <replaceable class="parameter">dbname</replaceable></term> <term><option>--dbname <replaceable class="parameter">dbname</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the name of the database to be clustered. Specifies the name of the database to be clustered.
...@@ -86,8 +86,8 @@ PostgreSQL documentation ...@@ -86,8 +86,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-a</term> <term><option>-a</></term>
<term>--all</term> <term><option>--all</></term>
<listitem> <listitem>
<para> <para>
Cluster all databases. Cluster all databases.
...@@ -96,8 +96,8 @@ PostgreSQL documentation ...@@ -96,8 +96,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-t <replaceable class="parameter">table</replaceable></term> <term><option>-t <replaceable class="parameter">table</replaceable></></term>
<term>--table <replaceable class="parameter">table</replaceable></term> <term><option>--table <replaceable class="parameter">table</replaceable></></term>
<listitem> <listitem>
<para> <para>
Clusters <replaceable class="parameter">table</replaceable> only. Clusters <replaceable class="parameter">table</replaceable> only.
...@@ -114,8 +114,8 @@ PostgreSQL documentation ...@@ -114,8 +114,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term>--host <replaceable class="parameter">host</replaceable></term> <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -127,8 +127,8 @@ PostgreSQL documentation ...@@ -127,8 +127,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term>--port <replaceable class="parameter">port</replaceable></term> <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -139,8 +139,8 @@ PostgreSQL documentation ...@@ -139,8 +139,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term>--username <replaceable class="parameter">username</replaceable></term> <term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -149,8 +149,8 @@ PostgreSQL documentation ...@@ -149,8 +149,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W</term> <term><option>-W</></term>
<term>--password</term> <term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
...@@ -159,8 +159,8 @@ PostgreSQL documentation ...@@ -159,8 +159,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e</term> <term><option>-e</></term>
<term>--echo</term> <term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the commands that <application>clusterdb</application> generates Echo the commands that <application>clusterdb</application> generates
...@@ -170,8 +170,8 @@ PostgreSQL documentation ...@@ -170,8 +170,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q</term> <term><option>-q</></term>
<term>--quiet</term> <term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.39 2002/08/30 16:00:41 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.40 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -477,7 +477,7 @@ order is detected here. ...@@ -477,7 +477,7 @@ order is detected here.
<listitem> <listitem>
<para> <para>
int32 bit mask to denote important aspects of the file format. Bits are int32 bit mask to denote important aspects of the file format. Bits are
numbered from 0 (LSB) to 31 (MSB) --- note that this field is stored numbered from 0 (<acronym>LSB</>) to 31 (<acronym>MSB</>) --- note that this field is stored
with source's endianness, as are all subsequent integer fields. Bits with source's endianness, as are all subsequent integer fields. Bits
16-31 are reserved to denote critical file format issues; a reader 16-31 are reserved to denote critical file format issues; a reader
should abort if it finds an unexpected bit set in this range. Bits 0-15 should abort if it finds an unexpected bit set in this range. Bits 0-15
...@@ -539,8 +539,8 @@ is left for a later release. ...@@ -539,8 +539,8 @@ is left for a later release.
Each tuple begins with an int16 count of the number of fields in the Each tuple begins with an int16 count of the number of fields in the
tuple. (Presently, all tuples in a table will have the same count, but tuple. (Presently, all tuples in a table will have the same count, but
that might not always be true.) Then, repeated for each field in the that might not always be true.) Then, repeated for each field in the
tuple, there is an int16 typlen word possibly followed by field data. tuple, there is an int16 <structfield>typlen</> word possibly followed by field data.
The typlen field is interpreted thus: The <structfield>typlen</> field is interpreted thus:
<variablelist> <variablelist>
<varlistentry> <varlistentry>
...@@ -557,7 +557,7 @@ The typlen field is interpreted thus: ...@@ -557,7 +557,7 @@ The typlen field is interpreted thus:
<listitem> <listitem>
<para> <para>
Field is a fixed-length data type. Exactly N Field is a fixed-length data type. Exactly N
bytes of data follow the typlen word. bytes of data follow the <structfield>typlen</> word.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -566,8 +566,8 @@ The typlen field is interpreted thus: ...@@ -566,8 +566,8 @@ The typlen field is interpreted thus:
<term>-1</term> <term>-1</term>
<listitem> <listitem>
<para> <para>
Field is a varlena data type. The next four Field is a <literal>varlena</> data type. The next four
bytes are the varlena header, which contains bytes are the <literal>varlena</> header, which contains
the total value length including itself. the total value length including itself.
</para> </para>
</listitem> </listitem>
...@@ -585,8 +585,8 @@ The typlen field is interpreted thus: ...@@ -585,8 +585,8 @@ The typlen field is interpreted thus:
</para> </para>
<para> <para>
For non-NULL fields, the reader can check that the typlen matches the For non-NULL fields, the reader can check that the <structfield>typlen</> matches the
expected typlen for the destination column. This provides a simple expected <structfield>typlen</> for the destination column. This provides a simple
but very useful check that the data is as expected. but very useful check that the data is as expected.
</para> </para>
...@@ -602,7 +602,7 @@ you from moving a binary file across machines). ...@@ -602,7 +602,7 @@ you from moving a binary file across machines).
<para> <para>
If OIDs are included in the dump, the OID field immediately follows the If OIDs are included in the dump, the OID field immediately follows the
field-count word. It is a normal field except that it's not included field-count word. It is a normal field except that it's not included
in the field-count. In particular it has a typlen --- this will allow in the field-count. In particular it has a <structfield>typlen</> --- this will allow
handling of 4-byte vs 8-byte OIDs without too much pain, and will allow handling of 4-byte vs 8-byte OIDs without too much pain, and will allow
OIDs to be shown as NULL if that ever proves desirable. OIDs to be shown as NULL if that ever proves desirable.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.20 2002/05/18 15:44:47 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.21 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -233,7 +233,7 @@ CREATE AGGREGATE ...@@ -233,7 +233,7 @@ CREATE AGGREGATE
If the state transition function is not strict, then it will be called If the state transition function is not strict, then it will be called
unconditionally at each input value, and must deal with NULL inputs unconditionally at each input value, and must deal with NULL inputs
and NULL transition values for itself. This allows the aggregate and NULL transition values for itself. This allows the aggregate
author to have full control over the aggregate's handling of NULLs. author to have full control over the aggregate's handling of null values.
</para> </para>
<para> <para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v 1.3 2002/08/22 00:01:40 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v 1.4 2002/09/21 18:32:54 petere Exp $ -->
<refentry id="SQL-CREATECONVERSION"> <refentry id="SQL-CREATECONVERSION">
<refmeta> <refmeta>
...@@ -139,7 +139,7 @@ CREATE [DEFAULT] CONVERSION <replaceable>conversion_name</replaceable> ...@@ -139,7 +139,7 @@ CREATE [DEFAULT] CONVERSION <replaceable>conversion_name</replaceable>
<title>Examples</title> <title>Examples</title>
<para> <para>
To create a conversion from encoding UNICODE to LATIN1 using myfunc: To create a conversion from encoding UNICODE to LATIN1 using <function>myfunc</>:
<programlisting> <programlisting>
CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc;
</programlisting> </programlisting>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.28 2002/06/17 05:40:32 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_database.sgml,v 1.29 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -114,7 +114,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> ...@@ -114,7 +114,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
<term><computeroutput>ERROR: user '<replaceable class="parameter">username</replaceable>' is not allowed to create/drop databases</computeroutput></term> <term><computeroutput>ERROR: user '<replaceable class="parameter">username</replaceable>' is not allowed to create/drop databases</computeroutput></term>
<listitem> <listitem>
<para> <para>
You must have the special CREATEDB privilege to create databases. You must have the special <literal>CREATEDB</> privilege to create databases.
See <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">. See <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">.
</para> </para>
</listitem> </listitem>
...@@ -186,7 +186,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> ...@@ -186,7 +186,7 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable>
Normally, the creator becomes the owner of the new database. Normally, the creator becomes the owner of the new database.
Superusers can create databases owned by other users using the Superusers can create databases owned by other users using the
<option>OWNER</> clause. They can even create databases owned by <option>OWNER</> clause. They can even create databases owned by
users with no special privileges. Non-superusers with CREATEDB users with no special privileges. Non-superusers with <literal>CREATEDB</>
privilege can only create databases owned by themselves. privilege can only create databases owned by themselves.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.42 2002/08/22 00:01:40 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.43 2002/09/21 18:32:54 petere Exp $
--> -->
<refentry id="SQL-CREATEFUNCTION"> <refentry id="SQL-CREATEFUNCTION">
...@@ -77,7 +77,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ...@@ -77,7 +77,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
Depending on the implementation language it may also be allowed Depending on the implementation language it may also be allowed
to specify <quote>pseudo-types</> such as <type>cstring</>. to specify <quote>pseudo-types</> such as <type>cstring</>.
Pseudo-types indicate that the actual argument type is either Pseudo-types indicate that the actual argument type is either
incompletely specified, or outside the set of ordinary SQL datatypes. incompletely specified, or outside the set of ordinary SQL data types.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -171,7 +171,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ...@@ -171,7 +171,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<literal>CALLED ON NULL INPUT</literal> (the default) indicates <literal>CALLED ON NULL INPUT</literal> (the default) indicates
that the function will be called normally when some of its that the function will be called normally when some of its
arguments are null. It is then the function author's arguments are null. It is then the function author's
responsibility to check for NULLs if necessary and respond responsibility to check for null values if necessary and respond
appropriately. appropriately.
</para> </para>
...@@ -247,7 +247,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ...@@ -247,7 +247,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>isStrict</term> <term><literal>isStrict</></term>
<listitem> <listitem>
<para> <para>
Equivalent to <literal>STRICT</literal> or <literal>RETURNS NULL ON NULL INPUT</literal> Equivalent to <literal>STRICT</literal> or <literal>RETURNS NULL ON NULL INPUT</literal>
...@@ -256,7 +256,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ...@@ -256,7 +256,7 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>isCachable</term> <term><literal>isCachable</></term>
<listitem> <listitem>
<para> <para>
<literal>isCachable</literal> is an obsolete equivalent of <literal>isCachable</literal> is an obsolete equivalent of
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.36 2002/08/13 20:40:43 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.37 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -266,7 +266,7 @@ ERROR: Cannot create index: 'index_name' already exists. ...@@ -266,7 +266,7 @@ ERROR: Cannot create index: 'index_name' already exists.
<para> <para>
The expression used in the <command>WHERE</command> clause may refer The expression used in the <command>WHERE</command> clause may refer
only to columns of the underlying table (but it can use all columns, only to columns of the underlying table (but it can use all columns,
not only the one(s) being indexed). Presently, sub-SELECTs and not only the one(s) being indexed). Presently, subqueries and
aggregate expressions are also forbidden in <command>WHERE</command>. aggregate expressions are also forbidden in <command>WHERE</command>.
</para> </para>
...@@ -331,7 +331,7 @@ ERROR: Cannot create index: 'index_name' already exists. ...@@ -331,7 +331,7 @@ ERROR: Cannot create index: 'index_name' already exists.
</para> </para>
<para> <para>
Testing has shown PostgreSQL's hash indexes to be similar or slower Testing has shown PostgreSQL's hash indexes to be similar or slower
than btree indexes, and the index size and build time for hash than B-tree indexes, and the index size and build time for hash
indexes is much worse. Hash indexes also suffer poor performance indexes is much worse. Hash indexes also suffer poor performance
under high concurrency. For these reasons, hash index use is under high concurrency. For these reasons, hash index use is
discouraged. discouraged.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.2 2002/08/22 00:01:40 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_opclass.sgml,v 1.3 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -52,8 +52,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL ...@@ -52,8 +52,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
<listitem> <listitem>
<para> <para>
If present, the operator class will become the default index If present, the operator class will become the default index
operator class for its datatype. At most one operator class operator class for its data type. At most one operator class
can be the default for a specific datatype and access method. can be the default for a specific data type and access method.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -61,7 +61,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL ...@@ -61,7 +61,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
<term><replaceable class="parameter">data_type</replaceable></term> <term><replaceable class="parameter">data_type</replaceable></term>
<listitem> <listitem>
<para> <para>
The column datatype that this operator class is for. The column data type that this operator class is for.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -95,10 +95,10 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL ...@@ -95,10 +95,10 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
<term><replaceable class="parameter">type</replaceable></term> <term><replaceable class="parameter">type</replaceable></term>
<listitem> <listitem>
<para> <para>
The input datatype(s) of an operator, or <literal>NONE</> to The input data type(s) of an operator, or <literal>NONE</> to
signify a left-unary or right-unary operator. The input datatypes signify a left-unary or right-unary operator. The input data types
may be omitted in the normal case where they are the same as the may be omitted in the normal case where they are the same as the
operator class's datatype. operator class's data type.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -135,7 +135,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL ...@@ -135,7 +135,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
<term><replaceable class="parameter">parameter_types</replaceable></term> <term><replaceable class="parameter">parameter_types</replaceable></term>
<listitem> <listitem>
<para> <para>
The parameter datatype(s) of the function. The parameter data type(s) of the function.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -143,8 +143,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL ...@@ -143,8 +143,8 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
<term><replaceable class="parameter">storage_type</replaceable></term> <term><replaceable class="parameter">storage_type</replaceable></term>
<listitem> <listitem>
<para> <para>
The datatype actually stored in the index. Normally this is the The data type actually stored in the index. Normally this is the
same as the column datatype, but some index access methods (only same as the column data type, but some index access methods (only
GIST at this writing) allow it to be different. The GIST at this writing) allow it to be different. The
<literal>STORAGE</> clause must be omitted unless the index access <literal>STORAGE</> clause must be omitted unless the index access
method allows a different type to be used. method allows a different type to be used.
...@@ -191,9 +191,9 @@ CREATE OPERATOR CLASS ...@@ -191,9 +191,9 @@ CREATE OPERATOR CLASS
<replaceable class="parameter">name</replaceable>. <replaceable class="parameter">name</replaceable>.
</para> </para>
<para> <para>
An operator class defines how a particular datatype can be used with An operator class defines how a particular data type can be used with
an index. The operator class specifies that certain operators will fill an index. The operator class specifies that certain operators will fill
particular roles or <quote>strategies</> for this datatype and this particular roles or <quote>strategies</> for this data type and this
access method. The operator class also specifies the support procedures to access method. The operator class also specifies the support procedures to
be used by be used by
the index access method when the operator class is selected for an the index access method when the operator class is selected for an
...@@ -210,7 +210,7 @@ CREATE OPERATOR CLASS ...@@ -210,7 +210,7 @@ CREATE OPERATOR CLASS
</para> </para>
<para> <para>
The user who defines an operator class becomes its owner. The user The user who defines an operator class becomes its owner. The user
must own the datatype for which the operator class is being defined, must own the data type for which the operator class is being defined,
and must have execute permission for all referenced operators and functions. and must have execute permission for all referenced operators and functions.
</para> </para>
...@@ -248,7 +248,7 @@ CREATE OPERATOR CLASS ...@@ -248,7 +248,7 @@ CREATE OPERATOR CLASS
</title> </title>
<para> <para>
The following example command defines a GiST index operator class The following example command defines a GiST index operator class
for datatype <literal>_int4</> (array of int4). See for data type <literal>_int4</> (array of int4). See
<filename>contrib/intarray/</> for the complete example. <filename>contrib/intarray/</> for the complete example.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.31 2002/08/23 02:54:18 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.32 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -268,10 +268,10 @@ CREATE OPERATOR ...@@ -268,10 +268,10 @@ CREATE OPERATOR
are always equivalent. are always equivalent.
</para> </para>
<para> <para>
At least one of LEFTARG and RIGHTARG must be defined. For At least one of <literal>LEFTARG</> and <literal>RIGHTARG</> must be defined. For
binary operators, both should be defined. For right unary binary operators, both should be defined. For right unary
operators, only LEFTARG should be defined, while for left operators, only <literal>LEFTARG</> should be defined, while for left
unary operators only RIGHTARG should be defined. unary operators only <literal>RIGHTARG</> should be defined.
</para> </para>
<para> <para>
The The
...@@ -335,39 +335,43 @@ MYBOXES.description !== box '((0,0), (1,1))' ...@@ -335,39 +335,43 @@ MYBOXES.description !== box '((0,0), (1,1))'
it also works to just have both operators refer to each other.) it also works to just have both operators refer to each other.)
</para> </para>
<para> <para>
The HASHES, MERGES, SORT1, SORT2, LTCMP, and GTCMP options are present to The <literal>HASHES</>, <literal>MERGES</>, <literal>SORT1</>,
support the query optimizer in performing joins. <literal>SORT2</>, <literal>LTCMP</>, and <literal>GTCMP</> options
<productname>PostgreSQL</productname> can always evaluate a join (i.e., are present to support the query optimizer in performing joins.
processing a clause with two tuple variables separated by an operator that <productname>PostgreSQL</productname> can always evaluate a join
returns a <type>boolean</type>) by iterative substitution [WONG76]. In (i.e., processing a clause with two tuple variables separated by an
addition, <productname>PostgreSQL</productname> can use a hash-join operator that returns a <type>boolean</type>) by iterative
algorithm along the lines of [SHAP86]; however, it must know whether this substitution <!--[WONG76]-->. In addition,
strategy is applicable. The current hash-join algorithm is only correct <productname>PostgreSQL</productname> can use a hash-join algorithm
for operators that represent equality tests; furthermore, equality of the <!--along the lines of [SHAP86]-->; however, it must know whether this
data type must mean bitwise equality of the representation of the type. strategy is applicable. The current hash-join algorithm is only
(For example, a data type that contains unused bits that don't matter for correct for operators that represent equality tests; furthermore,
equality tests could not be hash-joined.) The HASHES flag indicates to the equality of the data type must mean bitwise equality of the
query optimizer that a hash join may safely be used with this representation of the type. (For example, a data type that
operator. contains unused bits that don't matter for equality tests could not
</para> be hash-joined.) The <literal>HASHES</> flag indicates to the query optimizer
<para> that a hash join may safely be used with this operator.
Similarly, the MERGES flag indicates whether merge-sort is a usable join </para>
strategy for this operator. A merge join requires that the two input <para>
datatypes have consistent orderings, and that the mergejoin operator Similarly, the <literal>MERGES</> flag indicates whether merge-sort
behave like equality with respect to that ordering. For example, it is is a usable join strategy for this operator. A merge join requires
possible to merge-join equality between an integer and a float variable by that the two input data types have consistent orderings, and that
sorting both inputs in ordinary the merge-join operator behave like equality with respect to that
numeric order. Execution of a merge join requires that the system be ordering. For example, it is possible to merge-join equality
able to identify four operators related to the mergejoin equality operator: between an integer and a float variable by sorting both inputs in
less-than comparison for the left input datatype, ordinary numeric order. Execution of a merge join requires that
less-than comparison for the right input datatype, the system be able to identify four operators related to the
less-than comparison between the two datatypes, and merge-join equality operator: less-than comparison for the left
greater-than comparison between the two datatypes. It is possible to input data type, less-than comparison for the right input data
specify these by name, as the SORT1, SORT2, LTCMP, and GTCMP options type, less-than comparison between the two data types, and
respectively. The system will fill in the default names <literal>&lt;</>, greater-than comparison between the two data types. It is possible
<literal>&lt;</>, <literal>&lt;</>, <literal>&gt;</> respectively if to specify these by name, as the <literal>SORT1</>,
any of these are omitted when MERGES is specified. Also, MERGES will <literal>SORT2</>, <literal>LTCMP</>, and <literal>GTCMP</> options
be assumed to be implied if any of these four operator options appear. respectively. The system will fill in the default names
<literal>&lt;</>, <literal>&lt;</>, <literal>&lt;</>,
<literal>&gt;</> respectively if any of these are omitted when
<literal>MERGES</> is specified. Also, <literal>MERGES</> will be
assumed to be implied if any of these four operator options appear.
</para> </para>
<para> <para>
If other join strategies are found to be practical, If other join strategies are found to be practical,
...@@ -380,14 +384,15 @@ MYBOXES.description !== box '((0,0), (1,1))' ...@@ -380,14 +384,15 @@ MYBOXES.description !== box '((0,0), (1,1))'
be worth the complexity involved. be worth the complexity involved.
</para> </para>
<para> <para>
The RESTRICT and JOIN options assist the query optimizer in estimating The <literal>RESTRICT</> and <literal>JOIN</> options assist the
result sizes. If a clause of the form: query optimizer in estimating result sizes. If a clause of the
<programlisting> form:
MYBOXES.description &lt;&lt;&lt; box '((0,0), (1,1))' <programlisting>
</programlisting> myboxes.description &lt;&lt;&lt; box '((0,0), (1,1))'
</programlisting>
is present in the qualification, is present in the qualification,
then <productname>PostgreSQL</productname> may have to then <productname>PostgreSQL</productname> may have to
estimate the fraction of the instances in MYBOXES that estimate the fraction of the instances in <literal>myboxes</> that
satisfy the clause. The function satisfy the clause. The function
<replaceable class="parameter">res_proc</replaceable> <replaceable class="parameter">res_proc</replaceable>
must be a registered function (meaning it is already defined using must be a registered function (meaning it is already defined using
...@@ -400,7 +405,7 @@ MYBOXES.description &lt;&lt;&lt; box '((0,0), (1,1))' ...@@ -400,7 +405,7 @@ MYBOXES.description &lt;&lt;&lt; box '((0,0), (1,1))'
<para> <para>
Similarly, when the operands of the operator both contain Similarly, when the operands of the operator both contain
instance variables, the query optimizer must estimate the instance variables, the query optimizer must estimate the
size of the resulting join. The function join_proc will size of the resulting join. The function <function>join_proc</> will
return another floating-point number which will be multiplied return another floating-point number which will be multiplied
by the cardinalities of the two tables involved to by the cardinalities of the two tables involved to
compute the expected result size. compute the expected result size.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.2 2002/05/18 15:44:47 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_schema.sgml,v 1.3 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -33,7 +33,7 @@ CREATE SCHEMA AUTHORIZATION <replaceable class="parameter">username</replaceable ...@@ -33,7 +33,7 @@ CREATE SCHEMA AUTHORIZATION <replaceable class="parameter">username</replaceable
<term><replaceable class="parameter">schemaname</replaceable></term> <term><replaceable class="parameter">schemaname</replaceable></term>
<listitem> <listitem>
<para> <para>
The name of a schema to be created. If this is omitted, the username The name of a schema to be created. If this is omitted, the user name
is used as the schema name. is used as the schema name.
</para> </para>
</listitem> </listitem>
...@@ -111,7 +111,7 @@ ERROR: namespace "<replaceable class="parameter">schemaname</replaceable>" alre ...@@ -111,7 +111,7 @@ ERROR: namespace "<replaceable class="parameter">schemaname</replaceable>" alre
<para> <para>
A schema is essentially a namespace: A schema is essentially a namespace:
it contains named objects (tables, datatypes, functions, and operators) it contains named objects (tables, data types, functions, and operators)
whose names may duplicate those of other objects existing in other whose names may duplicate those of other objects existing in other
schemas. Named objects are accessed either by <quote>qualifying</> schemas. Named objects are accessed either by <quote>qualifying</>
their names with the schema name as a prefix, or by setting a search their names with the schema name as a prefix, or by setting a search
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.34 2002/08/29 00:17:01 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.35 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -208,7 +208,7 @@ CREATE TYPE ...@@ -208,7 +208,7 @@ CREATE TYPE
specified schema. Otherwise it is created in the current schema (the one specified schema. Otherwise it is created in the current schema (the one
at the front of the search path; see <literal>CURRENT_SCHEMA()</>). at the front of the search path; see <literal>CURRENT_SCHEMA()</>).
The type name must be distinct from the name of any existing type or The type name must be distinct from the name of any existing type or
domain in the same schema. (Because tables have associated datatypes, domain in the same schema. (Because tables have associated data types,
type names also must not conflict with table names in the same schema.) type names also must not conflict with table names in the same schema.)
</para> </para>
...@@ -231,10 +231,10 @@ CREATE TYPE ...@@ -231,10 +231,10 @@ CREATE TYPE
<type>cstring</type>, <type>OID</type>, <type>int4</type>. <type>cstring</type>, <type>OID</type>, <type>int4</type>.
(The first argument is the input text as a C string, the second (The first argument is the input text as a C string, the second
argument is the element type in case this is an array type, argument is the element type in case this is an array type,
and the third is the typmod of the destination column, if known.) and the third is the <literal>typmod</> of the destination column, if known.)
It should return a value of the datatype itself. It should return a value of the data type itself.
The output function may be The output function may be
declared as taking one argument of the new datatype, or as taking declared as taking one argument of the new data type, or as taking
two arguments of which the second is type <type>OID</type>. two arguments of which the second is type <type>OID</type>.
(The second argument is again the array element type for array types.) (The second argument is again the array element type for array types.)
The output function should return type <type>cstring</type>. The output function should return type <type>cstring</type>.
...@@ -245,9 +245,9 @@ CREATE TYPE ...@@ -245,9 +245,9 @@ CREATE TYPE
can be declared to have results or inputs of the new type, when they have can be declared to have results or inputs of the new type, when they have
to be created before the new type can be created. The answer is that the to be created before the new type can be created. The answer is that the
input function must be created first, then the output function, then the input function must be created first, then the output function, then the
datatype. data type.
<productname>PostgreSQL</productname> will first see the name of the new <productname>PostgreSQL</productname> will first see the name of the new
datatype as the return type of the input function. It will create a data type as the return type of the input function. It will create a
<quote>shell</> type, which is simply a placeholder entry in <quote>shell</> type, which is simply a placeholder entry in
<literal>pg_type</>, and link the input function definition to the shell <literal>pg_type</>, and link the input function definition to the shell
type. Similarly the output function will be linked to the (now already type. Similarly the output function will be linked to the (now already
...@@ -273,7 +273,7 @@ CREATE TYPE ...@@ -273,7 +273,7 @@ CREATE TYPE
positive integer, or variable length, indicated by setting positive integer, or variable length, indicated by setting
<replaceable class="parameter">internallength</replaceable> <replaceable class="parameter">internallength</replaceable>
to <option>VARIABLE</option>. (Internally, this is represented to <option>VARIABLE</option>. (Internally, this is represented
by setting typlen to -1.) The internal representation of all by setting <literal>typlen</> to -1.) The internal representation of all
variable-length types must start with an integer giving the total variable-length types must start with an integer giving the total
length of this value of the type. length of this value of the type.
</para> </para>
...@@ -346,7 +346,7 @@ CREATE TYPE ...@@ -346,7 +346,7 @@ CREATE TYPE
<para> <para>
The second form of <command>CREATE TYPE</command> The second form of <command>CREATE TYPE</command>
creates a composite type. creates a composite type.
The composite type is specified by a list of column names and datatypes. The composite type is specified by a list of column names and data types.
This is essentially the same as the row type This is essentially the same as the row type
of a table, but using <command>CREATE TYPE</command> avoids the need to of a table, but using <command>CREATE TYPE</command> avoids the need to
create an actual table when all that is wanted is to define a type. create an actual table when all that is wanted is to define a type.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.19 2002/09/02 20:04:39 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -235,7 +235,7 @@ CREATE VIEW <replaceable class="parameter">view</replaceable> [ <replaceable cla ...@@ -235,7 +235,7 @@ CREATE VIEW <replaceable class="parameter">view</replaceable> [ <replaceable cla
<listitem> <listitem>
<para> <para>
This option is to do with updatable views. This option is to do with updatable views.
All INSERTs and UPDATEs on the view will be All <command>INSERT</> and <command>UPDATE</> commands on the view will be
checked to ensure data satisfy the view-defining checked to ensure data satisfy the view-defining
condition. If they do not, the update will be rejected. condition. If they do not, the update will be rejected.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.28 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.29 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -61,7 +61,8 @@ PostgreSQL documentation ...@@ -61,7 +61,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -72,7 +73,8 @@ PostgreSQL documentation ...@@ -72,7 +73,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or the local Unix domain socket file Specifies the Internet TCP/IP port or the local Unix domain socket file
...@@ -82,7 +84,8 @@ PostgreSQL documentation ...@@ -82,7 +84,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -91,7 +94,8 @@ PostgreSQL documentation ...@@ -91,7 +94,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W, --password</term> <term><option>-W</></term>
<term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
...@@ -100,7 +104,8 @@ PostgreSQL documentation ...@@ -100,7 +104,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the queries that <application>createdb</application> generates Echo the queries that <application>createdb</application> generates
...@@ -110,7 +115,8 @@ PostgreSQL documentation ...@@ -110,7 +115,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q, --quiet</term> <term><option>-q</></term>
<term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
...@@ -119,7 +125,8 @@ PostgreSQL documentation ...@@ -119,7 +125,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-O, --owner <replaceable class="parameter">owner</replaceable></term> <term><option>-O <replaceable class="parameter">owner</replaceable></></term>
<term><option>--owner <replaceable class="parameter">owner</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the database user who will own the new database. Specifies the database user who will own the new database.
...@@ -128,7 +135,8 @@ PostgreSQL documentation ...@@ -128,7 +135,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-D, --location <replaceable class="parameter">datadir</replaceable></term> <term><option>-D <replaceable class="parameter">datadir</replaceable></></term>
<term><option>--location <replaceable class="parameter">datadir</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the alternative location for the database. See also <xref Specifies the alternative location for the database. See also <xref
...@@ -138,7 +146,8 @@ PostgreSQL documentation ...@@ -138,7 +146,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-T, --template <replaceable class="parameter">template</replaceable></term> <term><option>-T <replaceable class="parameter">template</replaceable></></term>
<term><option>--template <replaceable class="parameter">template</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the template database from which to build this database. Specifies the template database from which to build this database.
...@@ -147,7 +156,8 @@ PostgreSQL documentation ...@@ -147,7 +156,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-E, --encoding <replaceable class="parameter">encoding</replaceable></term> <term><option>-E <replaceable class="parameter">encoding</replaceable></></term>
<term><option>--encoding <replaceable class="parameter">encoding</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the character encoding scheme to be used in this database. Specifies the character encoding scheme to be used in this database.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.26 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.27 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -69,7 +69,8 @@ PostgreSQL documentation ...@@ -69,7 +69,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-d, --dbname <replaceable class="parameter">dbname</replaceable></term> <term><option>-d <replaceable class="parameter">dbname</replaceable></></term>
<term><option>--dbname <replaceable class="parameter">dbname</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies to which database the language should be added. Specifies to which database the language should be added.
...@@ -80,7 +81,8 @@ PostgreSQL documentation ...@@ -80,7 +81,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Displays SQL commands as they are executed. Displays SQL commands as they are executed.
...@@ -89,7 +91,8 @@ PostgreSQL documentation ...@@ -89,7 +91,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-l, --list</term> <term><option>-l</></term>
<term><option>--list</></term>
<listitem> <listitem>
<para> <para>
Shows a list of already installed languages in the target database Shows a list of already installed languages in the target database
...@@ -99,7 +102,7 @@ PostgreSQL documentation ...@@ -99,7 +102,7 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--L <replaceable class="parameter">directory</replaceable></term> <term><option>-L <replaceable class="parameter">directory</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the directory in which the language interpreter is Specifies the directory in which the language interpreter is
...@@ -118,7 +121,8 @@ PostgreSQL documentation ...@@ -118,7 +121,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -130,7 +134,8 @@ PostgreSQL documentation ...@@ -130,7 +134,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -141,7 +146,8 @@ PostgreSQL documentation ...@@ -141,7 +146,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -150,7 +156,8 @@ PostgreSQL documentation ...@@ -150,7 +156,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W, --password</term> <term><option>-W</></term>
<term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.27 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.28 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -39,7 +39,7 @@ PostgreSQL documentation ...@@ -39,7 +39,7 @@ PostgreSQL documentation
<para> <para>
Being a superuser also implies the ability to bypass access permission Being a superuser also implies the ability to bypass access permission
checks within the database, so superuser-dom should not be granted lightly. checks within the database, so superuserdom should not be granted lightly.
</para> </para>
<para> <para>
...@@ -64,7 +64,8 @@ PostgreSQL documentation ...@@ -64,7 +64,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -76,7 +77,8 @@ PostgreSQL documentation ...@@ -76,7 +77,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -87,7 +89,8 @@ PostgreSQL documentation ...@@ -87,7 +89,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the queries that <application>createuser</application> generates Echo the queries that <application>createuser</application> generates
...@@ -97,7 +100,8 @@ PostgreSQL documentation ...@@ -97,7 +100,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q, --quiet</term> <term><option>-q</></term>
<term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
...@@ -106,7 +110,8 @@ PostgreSQL documentation ...@@ -106,7 +110,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-d, --createdb</term> <term><option>-d</></term>
<term><option>--createdb</></term>
<listitem> <listitem>
<para> <para>
The new user is allowed to create databases. The new user is allowed to create databases.
...@@ -115,7 +120,8 @@ PostgreSQL documentation ...@@ -115,7 +120,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-D, --no-createdb</term> <term><option>-D</></term>
<term><option>--no-createdb</></term>
<listitem> <listitem>
<para> <para>
The new user is not allowed to create databases. The new user is not allowed to create databases.
...@@ -124,7 +130,8 @@ PostgreSQL documentation ...@@ -124,7 +130,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-a, --adduser</term> <term><option>-a</></term>
<term><option>--adduser</></term>
<listitem> <listitem>
<para> <para>
The new user is allowed to create other users. The new user is allowed to create other users.
...@@ -135,7 +142,8 @@ PostgreSQL documentation ...@@ -135,7 +142,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-A, --no-adduser</term> <term><option>-A</></term>
<term><option>--no-adduser</></term>
<listitem> <listitem>
<para> <para>
The new user is not allowed to create other users (i.e., The new user is not allowed to create other users (i.e.,
...@@ -145,7 +153,8 @@ PostgreSQL documentation ...@@ -145,7 +153,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-P, --pwprompt</term> <term><option>-P</></term>
<term><option>--pwprompt</></term>
<listitem> <listitem>
<para> <para>
If given, <application>createuser</application> will issue a prompt for If given, <application>createuser</application> will issue a prompt for
...@@ -156,7 +165,8 @@ PostgreSQL documentation ...@@ -156,7 +165,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-i, --sysid <replaceable class="parameter">uid</replaceable></term> <term><option>-i <replaceable class="parameter">uid</replaceable></></term>
<term><option>--sysid <replaceable class="parameter">uid</replaceable></></term>
<listitem> <listitem>
<para> <para>
Allows you to pick a non-default user id for the new user. This is not Allows you to pick a non-default user id for the new user. This is not
...@@ -166,7 +176,8 @@ PostgreSQL documentation ...@@ -166,7 +176,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-E, --encrypted</term> <term><option>-E</></term>
<term><option>--encrypted</></term>
<listitem> <listitem>
<para> <para>
Encrypts the user's password stored in the database. If not Encrypts the user's password stored in the database. If not
...@@ -176,7 +187,8 @@ PostgreSQL documentation ...@@ -176,7 +187,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-N, --unencrypted</term> <term><option>-N</></term>
<term><option>--unencrypted</></term>
<listitem> <listitem>
<para> <para>
Does not encrypt the user's password stored in the database. If Does not encrypt the user's password stored in the database. If
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.2 2002/07/22 13:00:00 ishii Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.3 2002/09/21 18:32:54 petere Exp $ -->
<refentry id="SQL-DROPCONVERSION"> <refentry id="SQL-DROPCONVERSION">
<refmeta> <refmeta>
...@@ -76,7 +76,7 @@ DROP CONVERSION <replaceable>conversion_name</replaceable> ...@@ -76,7 +76,7 @@ DROP CONVERSION <replaceable>conversion_name</replaceable>
<title>Examples</title> <title>Examples</title>
<para> <para>
To drop the conversion named myname: To drop the conversion named <literal>myname</>:
<programlisting> <programlisting>
DROP CONVERSION myname; DROP CONVERSION myname;
</programlisting> </programlisting>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.1 2002/07/29 22:14:10 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.2 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -134,7 +134,7 @@ DROP OPERATOR CLASS ...@@ -134,7 +134,7 @@ DROP OPERATOR CLASS
Usage Usage
</title> </title>
<para> <para>
Remove btree operator class <literal>widget_ops</literal>: Remove B-tree operator class <literal>widget_ops</literal>:
<programlisting> <programlisting>
DROP OPERATOR CLASS widget_ops USING btree; DROP OPERATOR CLASS widget_ops USING btree;
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.17 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.18 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -54,7 +54,8 @@ PostgreSQL documentation ...@@ -54,7 +54,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -66,7 +67,8 @@ PostgreSQL documentation ...@@ -66,7 +67,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -77,7 +79,8 @@ PostgreSQL documentation ...@@ -77,7 +79,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -86,7 +89,8 @@ PostgreSQL documentation ...@@ -86,7 +89,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W, --password</term> <term><option>-W</></term>
<term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
...@@ -95,7 +99,8 @@ PostgreSQL documentation ...@@ -95,7 +99,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the queries that <application>dropdb</application> generates Echo the queries that <application>dropdb</application> generates
...@@ -105,7 +110,8 @@ PostgreSQL documentation ...@@ -105,7 +110,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q, --quiet</term> <term><option>-q</></term>
<term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
...@@ -114,7 +120,8 @@ PostgreSQL documentation ...@@ -114,7 +120,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-i, --interactive</term> <term><option>-i</></term>
<term><option>--interactive</></term>
<listitem> <listitem>
<para> <para>
Issues a verification prompt before doing anything destructive. Issues a verification prompt before doing anything destructive.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.20 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.21 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -69,7 +69,8 @@ PostgreSQL documentation ...@@ -69,7 +69,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>[-d, --dbname] <replaceable class="parameter">dbname</replaceable></term> <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term>
<term><option><optional>--dbname</> <replaceable class="parameter">dbname</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies from which database the language should be removed. Specifies from which database the language should be removed.
...@@ -80,7 +81,8 @@ PostgreSQL documentation ...@@ -80,7 +81,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Displays SQL commands as they are executed. Displays SQL commands as they are executed.
...@@ -89,7 +91,8 @@ PostgreSQL documentation ...@@ -89,7 +91,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-l, --list</term> <term><option>-l</></term>
<term><option>--list</></term>
<listitem> <listitem>
<para> <para>
Shows a list of already installed languages in the target database Shows a list of already installed languages in the target database
...@@ -107,7 +110,8 @@ PostgreSQL documentation ...@@ -107,7 +110,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -119,7 +123,8 @@ PostgreSQL documentation ...@@ -119,7 +123,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -130,7 +135,8 @@ PostgreSQL documentation ...@@ -130,7 +135,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -139,7 +145,8 @@ PostgreSQL documentation ...@@ -139,7 +145,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W, --password</term> <term><option>-W</></term>
<term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.20 2002/08/10 16:57:31 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.21 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -56,7 +56,8 @@ PostgreSQL documentation ...@@ -56,7 +56,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -68,7 +69,8 @@ PostgreSQL documentation ...@@ -68,7 +69,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -79,7 +81,8 @@ PostgreSQL documentation ...@@ -79,7 +81,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo</term> <term><option>-e</></term>
<term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the queries that <application>dropuser</application> generates Echo the queries that <application>dropuser</application> generates
...@@ -89,7 +92,8 @@ PostgreSQL documentation ...@@ -89,7 +92,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q, --quiet</term> <term><option>-q</></term>
<term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
...@@ -98,7 +102,8 @@ PostgreSQL documentation ...@@ -98,7 +102,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-i, --interactive</term> <term><option>-i</></term>
<term><option>--interactive</></term>
<listitem> <listitem>
<para> <para>
Prompt for confirmation before actually removing the user. Prompt for confirmation before actually removing the user.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.21 2002/04/21 19:02:39 thomas Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.22 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -114,8 +114,8 @@ PostgreSQL documentation ...@@ -114,8 +114,8 @@ PostgreSQL documentation
<para> <para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>--pgdata=<replaceable class="parameter">directory</replaceable></term> <term><option>--pgdata=<replaceable class="parameter">directory</replaceable></option></term>
<term>-D <replaceable class="parameter">directory</replaceable></term> <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
<listitem> <listitem>
<para> <para>
This option specifies the directory where the database system This option specifies the directory where the database system
...@@ -130,23 +130,23 @@ PostgreSQL documentation ...@@ -130,23 +130,23 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--username=<replaceable class="parameter">username</replaceable></term> <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
<term>-U <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
<listitem> <listitem>
<para> <para>
Selects the user name of the database superuser. This defaults Selects the user name of the database superuser. This defaults
to the name of the effective user running to the name of the effective user running
<command>initdb</command>. It is really not important what the <command>initdb</command>. It is really not important what the
superuser's name is, but one might choose to keep the superuser's name is, but one might choose to keep the
customary name <quote>postgres</quote>, even if the operating customary name <systemitem>postgres</systemitem>, even if the operating
system user's name is different. system user's name is different.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--pwprompt</term> <term><option>--pwprompt</option></term>
<term>-W</term> <term><option>-W</option></term>
<listitem> <listitem>
<para> <para>
Makes <command>initdb</command> prompt for a password Makes <command>initdb</command> prompt for a password
...@@ -159,8 +159,8 @@ PostgreSQL documentation ...@@ -159,8 +159,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--encoding=<replaceable class="parameter">encoding</replaceable></term> <term><option>--encoding=<replaceable class="parameter">encoding</replaceable></option></term>
<term>-E <replaceable class="parameter">encoding</replaceable></term> <term><option>-E <replaceable class="parameter">encoding</replaceable></option></term>
<listitem> <listitem>
<para> <para>
Selects the encoding of the template database. This will also Selects the encoding of the template database. This will also
...@@ -173,7 +173,7 @@ PostgreSQL documentation ...@@ -173,7 +173,7 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--locale=<replaceable>locale</replaceable></term> <term><option>--locale=<replaceable>locale</replaceable></option></term>
<listitem> <listitem>
<para> <para>
Sets the default locale for the database cluster. If this Sets the default locale for the database cluster. If this
...@@ -184,12 +184,12 @@ PostgreSQL documentation ...@@ -184,12 +184,12 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--lc-collate=<replaceable>locale</replaceable></term> <term><option>--lc-collate=<replaceable>locale</replaceable></option></term>
<term>--lc-ctype=<replaceable>locale</replaceable></term> <term><option>--lc-ctype=<replaceable>locale</replaceable></option></term>
<term>--lc-messages=<replaceable>locale</replaceable></term> <term><option>--lc-messages=<replaceable>locale</replaceable></option></term>
<term>--lc-monetary=<replaceable>locale</replaceable></term> <term><option>--lc-monetary=<replaceable>locale</replaceable></option></term>
<term>--lc-numeric=<replaceable>locale</replaceable></term> <term><option>--lc-numeric=<replaceable>locale</replaceable></option></term>
<term>--lc-time=<replaceable>locale</replaceable></term> <term><option>--lc-time=<replaceable>locale</replaceable></option></term>
<listitem> <listitem>
<para> <para>
...@@ -206,7 +206,7 @@ PostgreSQL documentation ...@@ -206,7 +206,7 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-L <replaceable class="parameter">directory</replaceable></term> <term><option>-L <replaceable class="parameter">directory</replaceable></option></term>
<listitem> <listitem>
<para> <para>
Specifies where <command>initdb</command> should find Specifies where <command>initdb</command> should find
...@@ -218,8 +218,8 @@ PostgreSQL documentation ...@@ -218,8 +218,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--noclean</term> <term><option>-n</option></term>
<term>-n</term> <term><option>--noclean</option></term>
<listitem> <listitem>
<para> <para>
By default, when <command>initdb</command> By default, when <command>initdb</command>
...@@ -232,8 +232,8 @@ PostgreSQL documentation ...@@ -232,8 +232,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>--debug</term> <term><option>-d</option></term>
<term>-d</term> <term><option>--debug</option></term>
<listitem> <listitem>
<para> <para>
Print debugging output from the bootstrap backend and a few other Print debugging output from the bootstrap backend and a few other
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.18 2002/04/24 02:31:30 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.19 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -55,8 +55,8 @@ INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable ...@@ -55,8 +55,8 @@ INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable
<term>DEFAULT VALUES</term> <term>DEFAULT VALUES</term>
<listitem> <listitem>
<para> <para>
All columns will be filled by NULLs or by values specified All columns will be filled by null values or by values specified
when the table was created using DEFAULT clauses. when the table was created using <literal>DEFAULT</> clauses.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/listen.sgml,v 1.14 2002/08/13 20:40:43 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/listen.sgml,v 1.15 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -115,12 +115,12 @@ WARNING: Async_Listen: We are already listening on <replaceable class="PARAMETE ...@@ -115,12 +115,12 @@ WARNING: Async_Listen: We are already listening on <replaceable class="PARAMETE
<para> <para>
The method a frontend application must use to detect notify events depends on The method a frontend application must use to detect notify events depends on
which <productname>PostgreSQL</productname> application programming interface it which <productname>PostgreSQL</productname> application programming interface it
uses. With the basic libpq library, the application issues uses. With the <application>libpq</> library, the application issues
<command>LISTEN</command> as an ordinary SQL command, and then must <command>LISTEN</command> as an ordinary SQL command, and then must
periodically call the routine <function>PQnotifies</function> to find out periodically call the routine <function>PQnotifies</function> to find out
whether any notify events have been received. Other interfaces such as whether any notify events have been received. Other interfaces such as
libpgtcl provide higher-level methods for handling notify events; indeed, <application>libpgtcl</> provide higher-level methods for handling notify events; indeed,
with libpgtcl the application programmer should not even issue with <application>libpgtcl</> the application programmer should not even issue
<command>LISTEN</command> or <command>UNLISTEN</command> directly. See the <command>LISTEN</command> or <command>UNLISTEN</command> directly. See the
documentation for the library you are using for more details. documentation for the library you are using for more details.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.33 2002/05/30 20:45:18 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.34 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -118,7 +118,7 @@ where <replaceable class="PARAMETER">lockmode</replaceable> is one of: ...@@ -118,7 +118,7 @@ where <replaceable class="PARAMETER">lockmode</replaceable> is one of:
Conflicts with SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE, Conflicts with SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE,
EXCLUSIVE and EXCLUSIVE and
ACCESS EXCLUSIVE modes. This mode protects a table against ACCESS EXCLUSIVE modes. This mode protects a table against
concurrent schema changes and VACUUMs. concurrent schema changes and <command>VACUUM</> runs.
</para> </para>
<note> <note>
...@@ -289,8 +289,8 @@ ERROR <replaceable class="PARAMETER">name</replaceable>: Table does not exist. ...@@ -289,8 +289,8 @@ ERROR <replaceable class="PARAMETER">name</replaceable>: Table does not exist.
To achieve a similar effect when running a transaction To achieve a similar effect when running a transaction
at the SERIALIZABLE isolation level, you have to execute the at the SERIALIZABLE isolation level, you have to execute the
<command>LOCK TABLE</> <command>LOCK TABLE</>
statement before executing any DML statement. A serializable statement before executing any <acronym>DML</> statement. A serializable
transaction's view of data will be frozen when its first DML statement transaction's view of data will be frozen when its first <acronym>DML</> statement
begins. A later <command>LOCK</> will still prevent concurrent writes begins. A later <command>LOCK</> will still prevent concurrent writes
--- but it --- but it
won't ensure that what the transaction reads corresponds to the latest won't ensure that what the transaction reads corresponds to the latest
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.18 2002/08/13 20:40:44 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/notify.sgml,v 1.19 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -95,7 +95,7 @@ NOTIFY ...@@ -95,7 +95,7 @@ NOTIFY
</para> </para>
<para> <para>
The information passed to the frontend for a notify event includes the notify The information passed to the frontend for a notify event includes the notify
condition name and the notifying backend process's PID. It is up to the condition name and the notifying backend process's <acronym>PID</>. It is up to the
database designer to define the condition names that will be used in a given database designer to define the condition names that will be used in a given
database and what each one means. database and what each one means.
</para> </para>
...@@ -109,7 +109,7 @@ NOTIFY ...@@ -109,7 +109,7 @@ NOTIFY
</para> </para>
<para> <para>
<command>NOTIFY</command> provides a simple form of signal or <command>NOTIFY</command> provides a simple form of signal or
IPC (interprocess communication) mechanism for a collection of processes <acronym>IPC</> (interprocess communication) mechanism for a collection of processes
accessing the same <productname>PostgreSQL</productname> database. accessing the same <productname>PostgreSQL</productname> database.
Higher-level mechanisms can be built by using tables in the database to Higher-level mechanisms can be built by using tables in the database to
pass additional data (beyond a mere condition name) from notifier to pass additional data (beyond a mere condition name) from notifier to
...@@ -158,8 +158,8 @@ NOTIFY ...@@ -158,8 +158,8 @@ NOTIFY
re-reading a database table to find the same updates that that frontend just re-reading a database table to find the same updates that that frontend just
wrote out. In <productname>PostgreSQL</productname> 6.4 and later, it is wrote out. In <productname>PostgreSQL</productname> 6.4 and later, it is
possible to avoid such extra work by noticing whether the notifying backend possible to avoid such extra work by noticing whether the notifying backend
process's PID (supplied in the notify event message) is the same as one's own process's <acronym>PID</> (supplied in the notify event message) is the same as one's own
backend's PID (available from libpq). When they are the same, the notify backend's <acronym>PID</> (available from <application>libpq</>). When they are the same, the notify
event is one's own work bouncing back, and can be ignored. (Despite what was event is one's own work bouncing back, and can be ignored. (Despite what was
said in the preceding paragraph, this is a safe technique. said in the preceding paragraph, this is a safe technique.
<productname>PostgreSQL</productname> keeps self-notifies separate from notifies <productname>PostgreSQL</productname> keeps self-notifies separate from notifies
...@@ -191,7 +191,7 @@ NOTIFY ...@@ -191,7 +191,7 @@ NOTIFY
</para> </para>
<para> <para>
In <productname>PostgreSQL</productname> releases prior to 6.4, the backend In <productname>PostgreSQL</productname> releases prior to 6.4, the backend
PID delivered in a notify message was always the PID of the frontend's own <acronym>PID</> delivered in a notify message was always the <acronym>PID</> of the frontend's own
backend. So it was not possible to distinguish one's own notifies from other backend. So it was not possible to distinguish one's own notifies from other
clients' notifies in those earlier releases. clients' notifies in those earlier releases.
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.15 2002/07/28 15:22:20 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.16 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -148,7 +148,7 @@ PostgreSQL documentation ...@@ -148,7 +148,7 @@ PostgreSQL documentation
<para> <para>
Append the server log output to Append the server log output to
<replaceable>filename</replaceable>. If the file does not <replaceable>filename</replaceable>. If the file does not
exist, it is created. The umask is set to 077, so access to exist, it is created. The <systemitem>umask</> is set to 077, so access to
the log file from other users is disallowed by default. the log file from other users is disallowed by default.
</para> </para>
</listitem> </listitem>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.31 2002/07/28 15:22:21 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.32 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -146,7 +146,7 @@ PostgreSQL documentation ...@@ -146,7 +146,7 @@ PostgreSQL documentation
Disables <function>fsync</function> calls for performance Disables <function>fsync</function> calls for performance
improvement, at the risk of data corruption in event of a improvement, at the risk of data corruption in event of a
system crash. This parameter corresponds to setting system crash. This parameter corresponds to setting
fsync=false in postgresql.conf. Read the detailed <literal>fsync=false</> in <filename>postgresql.conf</>. Read the detailed
documentation before using this! documentation before using this!
</para> </para>
<para> <para>
...@@ -176,7 +176,7 @@ PostgreSQL documentation ...@@ -176,7 +176,7 @@ PostgreSQL documentation
Allows clients to connect via TCP/IP (Internet domain) Allows clients to connect via TCP/IP (Internet domain)
connections. Without this option, only local Unix domain connections. Without this option, only local Unix domain
socket connections are accepted. This option corresponds socket connections are accepted. This option corresponds
to setting tcpip_socket=true in postgresql.conf. to setting <literal>tcpip_socket=true</> in <filename>postgresql.conf</>.
</para> </para>
<para> <para>
<option>--tcpip_socket=false</option> has the opposite <option>--tcpip_socket=false</option> has the opposite
...@@ -350,7 +350,7 @@ PostgreSQL documentation ...@@ -350,7 +350,7 @@ PostgreSQL documentation
<listitem> <listitem>
<para> <para>
Default character encoding used by clients. (The clients may Default character encoding used by clients. (The clients may
override this invidiually.) This value can also be set in the override this individually.) This value can also be set in the
configuration file. configuration file.
</para> </para>
</listitem> </listitem>
...@@ -382,7 +382,7 @@ PostgreSQL documentation ...@@ -382,7 +382,7 @@ PostgreSQL documentation
<listitem> <listitem>
<para> <para>
Default port (preferrably set in the configuration file) Default port (preferably set in the configuration file)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -520,10 +520,11 @@ StreamServerPort: cannot bind to port ...@@ -520,10 +520,11 @@ StreamServerPort: cannot bind to port
</para> </para>
<para> <para>
The <option>--</> options will not work on FreeBSD or OpenBSD. The <option>--</> options will not work on <systemitem
class="osname">FreeBSD</> or <systemitem class="osname">OpenBSD</>.
Use <option>-c</> instead. This is a bug in the affected operating Use <option>-c</> instead. This is a bug in the affected operating
systems; a future release of <productname>PostgreSQL</productname> will systems; a future release of <productname>PostgreSQL</productname>
provide a workaround if this is not fixed. will provide a workaround if this is not fixed.
</para> </para>
</refsect1> </refsect1>
...@@ -547,7 +548,7 @@ StreamServerPort: cannot bind to port ...@@ -547,7 +548,7 @@ StreamServerPort: cannot bind to port
</screen> </screen>
This command will start up <application>postmaster</application> This command will start up <application>postmaster</application>
communicating through the port 1234. In order to connect to this communicating through the port 1234. In order to connect to this
<application>postmaster</application> using psql, you would need to <application>postmaster</application> using <application>psql</>, you would need to
run it as run it as
<screen> <screen>
<prompt>$</prompt> <userinput>psql -p 1234</userinput> <prompt>$</prompt> <userinput>psql -p 1234</userinput>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.75 2002/09/18 20:09:32 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.76 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -51,19 +51,21 @@ PostgreSQL documentation ...@@ -51,19 +51,21 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-a, --echo-all</term> <term><option>-a</></term>
<term><option>--echo-all</></term>
<listitem> <listitem>
<para> <para>
Print all the lines to the screen as they are read. This is more Print all the lines to the screen as they are read. This is more
useful for script processing rather than interactive mode. This is useful for script processing rather than interactive mode. This is
equivalent to setting the variable <envar>ECHO</envar> to equivalent to setting the variable <varname>ECHO</varname> to
<literal>all</literal>. <literal>all</literal>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-A, --no-align</term> <term><option>-A</></term>
<term><option>--no-align</></term>
<listitem> <listitem>
<para> <para>
Switches to unaligned output mode. (The default output mode is Switches to unaligned output mode. (The default output mode is
...@@ -73,7 +75,8 @@ PostgreSQL documentation ...@@ -73,7 +75,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-c, --command <replaceable class="parameter">query</replaceable></term> <term><option>-c <replaceable class="parameter">query</replaceable></></term>
<term><option>--command <replaceable class="parameter">query</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies that <application>psql</application> is to execute one Specifies that <application>psql</application> is to execute one
...@@ -82,7 +85,7 @@ PostgreSQL documentation ...@@ -82,7 +85,7 @@ PostgreSQL documentation
</para> </para>
<para> <para>
<replaceable class="parameter">query</replaceable> must be either <replaceable class="parameter">query</replaceable> must be either
a query string that is completely parseable by the backend (i.e., a query string that is completely parsable by the backend (i.e.,
it contains no <application>psql</application> specific features), it contains no <application>psql</application> specific features),
or it is a single backslash command. Thus you cannot mix or it is a single backslash command. Thus you cannot mix
<acronym>SQL</acronym> and <application>psql</application> <acronym>SQL</acronym> and <application>psql</application>
...@@ -94,7 +97,8 @@ PostgreSQL documentation ...@@ -94,7 +97,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-d, --dbname <replaceable class="parameter">dbname</replaceable></term> <term><option>-d <replaceable class="parameter">dbname</replaceable></></term>
<term><option>--dbname <replaceable class="parameter">dbname</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the name of the database to connect to. This is Specifies the name of the database to connect to. This is
...@@ -106,31 +110,34 @@ PostgreSQL documentation ...@@ -106,31 +110,34 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e, --echo-queries</term> <term><option>-e</></term>
<term><option>--echo-queries</></term>
<listitem> <listitem>
<para> <para>
Show all queries that are sent to the backend. This is equivalent Show all queries that are sent to the backend. This is equivalent
to setting the variable <envar>ECHO</envar> to to setting the variable <varname>ECHO</varname> to
<literal>queries</literal>. <literal>queries</literal>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-E, --echo-hidden</term> <term><option>-E</></term>
<term><option>--echo-hidden</></term>
<listitem> <listitem>
<para> <para>
Echoes the actual queries generated by \d and other backslash Echoes the actual queries generated by \d and other backslash
commands. You can use this if you wish to include similar commands. You can use this if you wish to include similar
functionality into your own programs. This is equivalent to functionality into your own programs. This is equivalent to
setting the variable <envar>ECHO_HIDDEN</envar> from within setting the variable <varname>ECHO_HIDDEN</varname> from within
<application>psql</application>. <application>psql</application>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-f, --file <replaceable class="parameter">filename</replaceable></term> <term><option>-f <replaceable class="parameter">filename</replaceable></></term>
<term><option>--file <replaceable class="parameter">filename</replaceable></></term>
<listitem> <listitem>
<para> <para>
Use the file <replaceable class="parameter">filename</replaceable> Use the file <replaceable class="parameter">filename</replaceable>
...@@ -161,7 +168,8 @@ PostgreSQL documentation ...@@ -161,7 +168,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-F, --field-separator <replaceable class="parameter">separator</replaceable></term> <term><option>-F <replaceable class="parameter">separator</replaceable></></term>
<term><option>--field-separator <replaceable class="parameter">separator</replaceable></></term>
<listitem> <listitem>
<para> <para>
Use <replaceable class="parameter">separator</replaceable> as the Use <replaceable class="parameter">separator</replaceable> as the
...@@ -172,19 +180,21 @@ PostgreSQL documentation ...@@ -172,19 +180,21 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-h, --host <replaceable class="parameter">hostname</replaceable></term> <term><option>-h <replaceable class="parameter">hostname</replaceable></></term>
<term><option>--host <replaceable class="parameter">hostname</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
<application>postmaster</application> is running. If host begins <application>postmaster</application> is running. If host begins
with a slash, it is used as the directory for the unix domain with a slash, it is used as the directory for the Unix-domain
socket. socket.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-H, --html</term> <term><option>-H</></term>
<term><option>--html</></term>
<listitem> <listitem>
<para> <para>
Turns on <acronym>HTML</acronym> tabular output. This is Turns on <acronym>HTML</acronym> tabular output. This is
...@@ -195,7 +205,8 @@ PostgreSQL documentation ...@@ -195,7 +205,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-l, --list</term> <term><option>-l</></term>
<term><option>--list</></term>
<listitem> <listitem>
<para> <para>
Lists all available databases, then exits. Other non-connection Lists all available databases, then exits. Other non-connection
...@@ -206,7 +217,8 @@ PostgreSQL documentation ...@@ -206,7 +217,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-o, --output <replaceable class="parameter">filename</replaceable></term> <term><option>-o <replaceable class="parameter">filename</replaceable></></term>
<term><option>--output <replaceable class="parameter">filename</replaceable></></term>
<listitem> <listitem>
<para> <para>
Put all query output into file <replaceable Put all query output into file <replaceable
...@@ -217,7 +229,8 @@ PostgreSQL documentation ...@@ -217,7 +229,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p, --port <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the TCP/IP port or, by omission, the local Unix domain Specifies the TCP/IP port or, by omission, the local Unix domain
...@@ -231,7 +244,8 @@ PostgreSQL documentation ...@@ -231,7 +244,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-P, --pset <replaceable class="parameter">assignment</replaceable></term> <term><option>-P <replaceable class="parameter">assignment</replaceable></></term>
<term><option>--pset <replaceable class="parameter">assignment</replaceable></></term>
<listitem> <listitem>
<para> <para>
Allows you to specify printing options in the style of Allows you to specify printing options in the style of
...@@ -244,7 +258,8 @@ PostgreSQL documentation ...@@ -244,7 +258,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q</term> <term><option>-q</></term>
<term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Specifies that <application>psql</application> should do its work Specifies that <application>psql</application> should do its work
...@@ -252,13 +267,14 @@ PostgreSQL documentation ...@@ -252,13 +267,14 @@ PostgreSQL documentation
informational output. If this option is used, none of this informational output. If this option is used, none of this
happens. This is useful with the <option>-c</option> option. happens. This is useful with the <option>-c</option> option.
Within <application>psql</application> you can also set the Within <application>psql</application> you can also set the
<envar>QUIET</envar> variable to achieve the same effect. <varname>QUIET</varname> variable to achieve the same effect.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-R, --record-separator <replaceable class="parameter">separator</replaceable></term> <term><option>-R <replaceable class="parameter">separator</replaceable></></term>
<term><option>--record-separator <replaceable class="parameter">separator</replaceable></></term>
<listitem> <listitem>
<para> <para>
Use <replaceable class="parameter">separator</replaceable> as the Use <replaceable class="parameter">separator</replaceable> as the
...@@ -269,7 +285,8 @@ PostgreSQL documentation ...@@ -269,7 +285,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-s, --single-step</term> <term><option>-s</></term>
<term><option>--single-step</></term>
<listitem> <listitem>
<para> <para>
Run in single-step mode. That means the user is prompted before Run in single-step mode. That means the user is prompted before
...@@ -280,7 +297,8 @@ PostgreSQL documentation ...@@ -280,7 +297,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-S, --single-line</term> <term><option>-S</></term>
<term><option>--single-line</></term>
<listitem> <listitem>
<para> <para>
Runs in single-line mode where a newline terminates a query, as a Runs in single-line mode where a newline terminates a query, as a
...@@ -299,7 +317,8 @@ PostgreSQL documentation ...@@ -299,7 +317,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-t, --tuples-only</term> <term><option>-t</></term>
<term><option>--tuples-only</></term>
<listitem> <listitem>
<para> <para>
Turn off printing of column names and result row count footers, Turn off printing of column names and result row count footers,
...@@ -310,7 +329,8 @@ PostgreSQL documentation ...@@ -310,7 +329,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-T, --table-attr <replaceable class="parameter">table_options</replaceable></term> <term><option>-T <replaceable class="parameter">table_options</replaceable></></term>
<term><option>--table-attr <replaceable class="parameter">table_options</replaceable></></term>
<listitem> <listitem>
<para> <para>
Allows you to specify options to be placed within the Allows you to specify options to be placed within the
...@@ -321,7 +341,7 @@ PostgreSQL documentation ...@@ -321,7 +341,7 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-u</term> <term><option>-u</></term>
<listitem> <listitem>
<para> <para>
Makes <application>psql</application> prompt for the user name and Makes <application>psql</application> prompt for the user name and
...@@ -339,7 +359,8 @@ PostgreSQL documentation ...@@ -339,7 +359,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U, --username <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
Connects to the database as the user <replaceable Connects to the database as the user <replaceable
...@@ -350,7 +371,9 @@ PostgreSQL documentation ...@@ -350,7 +371,9 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-v, --variable, --set <replaceable class="parameter">assignment</replaceable></term> <term><option>-v <replaceable class="parameter">assignment</replaceable></></term>
<term><option>--set <replaceable class="parameter">assignment</replaceable></></term>
<term><option>--variable <replaceable class="parameter">assignment</replaceable></></term>
<listitem> <listitem>
<para> <para>
Performs a variable assignment, like the <command>\set</command> Performs a variable assignment, like the <command>\set</command>
...@@ -365,7 +388,8 @@ PostgreSQL documentation ...@@ -365,7 +388,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-V, --version</term> <term><option>-V</></term>
<term><option>--version</></term>
<listitem> <listitem>
<para> <para>
Shows the <application>psql</application> version. Shows the <application>psql</application> version.
...@@ -374,7 +398,8 @@ PostgreSQL documentation ...@@ -374,7 +398,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W, --password</term> <term><option>-W</></term>
<term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Requests that <application>psql</application> should prompt for a Requests that <application>psql</application> should prompt for a
...@@ -396,7 +421,8 @@ PostgreSQL documentation ...@@ -396,7 +421,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-x, --expanded</term> <term><option>-x</></term>
<term><option>--expanded</></term>
<listitem> <listitem>
<para> <para>
Turns on extended row format mode. This is equivalent to the Turns on extended row format mode. This is equivalent to the
...@@ -406,7 +432,8 @@ PostgreSQL documentation ...@@ -406,7 +432,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-X, --no-psqlrc</term> <term><option>-X,</></term>
<term><option>--no-psqlrc</></term>
<listitem> <listitem>
<para> <para>
Do not read the start-up file <filename>~/.psqlrc</filename>. Do not read the start-up file <filename>~/.psqlrc</filename>.
...@@ -415,7 +442,8 @@ PostgreSQL documentation ...@@ -415,7 +442,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-?, --help</term> <term><option>-?</></term>
<term><option>--help</></term>
<listitem> <listitem>
<para> <para>
Shows help about <application>psql</application> command line Shows help about <application>psql</application> command line
...@@ -435,7 +463,7 @@ PostgreSQL documentation ...@@ -435,7 +463,7 @@ PostgreSQL documentation
finished normally, 1 if a fatal error of its own (out of memory, finished normally, 1 if a fatal error of its own (out of memory,
file not found) occurs, 2 if the connection to the backend went bad file not found) occurs, 2 if the connection to the backend went bad
and the session is not interactive, and 3 if an error occurred in a and the session is not interactive, and 3 if an error occurred in a
script and the variable <envar>ON_ERROR_STOP</envar> was set. script and the variable <varname>ON_ERROR_STOP</varname> was set.
</para> </para>
</refsect1> </refsect1>
...@@ -458,7 +486,7 @@ PostgreSQL documentation ...@@ -458,7 +486,7 @@ PostgreSQL documentation
not belong to any option it will be interpreted as the database name not belong to any option it will be interpreted as the database name
(or the user name, if the database name is also given). Not all (or the user name, if the database name is also given). Not all
these options are required, defaults do apply. If you omit the host these options are required, defaults do apply. If you omit the host
name psql will connect via a Unix domain socket to a server on the name, <application>psql</> will connect via a Unix domain socket to a server on the
local host. The default port number is compile-time determined. local host. The default port number is compile-time determined.
Since the database server uses the same default, you will not have Since the database server uses the same default, you will not have
to specify the port in most cases. The default user name is your to specify the port in most cases. The default user name is your
...@@ -556,11 +584,11 @@ testdb=> ...@@ -556,11 +584,11 @@ testdb=>
</para> </para>
<para> <para>
Arguments that are quoted in <quote>backticks</quote> Arguments that are enclosed in backquotes (<literal>`</literal>)
(<literal>`</literal>) are taken as a command line that is passed to are taken as a command line that is passed to the shell. The
the shell. The output of the command (with any trailing newline output of the command (with any trailing newline removed) is taken
removed) is taken as the argument value. The above escape sequences as the argument value. The above escape sequences also apply in
also apply in backticks. backquotes.
</para> </para>
<para> <para>
...@@ -665,13 +693,13 @@ testdb=> ...@@ -665,13 +693,13 @@ testdb=>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><literal>\copy</literal> <replaceable class="parameter">table</replaceable> <term><literal>\copy <replaceable class="parameter">table</replaceable>
{ <literal>from</literal> | <literal>to</literal> } { <literal>from</literal> | <literal>to</literal> }
<replaceable class="parameter">filename</replaceable> | stdin | stdout <replaceable class="parameter">filename</replaceable> | stdin | stdout
[ <literal>with</literal> ] [ <literal>with</literal> ]
[ <literal>oids</literal> ] [ <literal>oids</literal> ]
[ <literal>delimiter [as] </literal> '<replaceable class="parameter">character</replaceable>' ] [ <literal>delimiter [as] </literal> '<replaceable class="parameter">character</replaceable>' ]
[ <literal>null [as] </literal> '<replaceable class="parameter">string</replaceable>' ] [ <literal>null [as] </literal> '<replaceable class="parameter">string</replaceable>' ]</literal>
</term> </term>
<listitem> <listitem>
...@@ -838,7 +866,7 @@ testdb=> ...@@ -838,7 +866,7 @@ testdb=>
<note> <note>
<para> <para>
To reduce clutter, <literal>\df</> does not show datatype I/O To reduce clutter, <literal>\df</> does not show data type I/O
functions. This is implemented by ignoring functions that accept functions. This is implemented by ignoring functions that accept
or return type <type>cstring</>. or return type <type>cstring</>.
</para> </para>
...@@ -1087,7 +1115,7 @@ Tue Oct 26 21:40:57 CEST 1999 ...@@ -1087,7 +1115,7 @@ Tue Oct 26 21:40:57 CEST 1999
<note> <note>
<para> <para>
If you want to see the lines on the screen as they are read you If you want to see the lines on the screen as they are read you
must set the variable <envar>ECHO</envar> to must set the variable <varname>ECHO</varname> to
<literal>all</literal>. <literal>all</literal>.
</para> </para>
</note> </note>
...@@ -1132,7 +1160,7 @@ Tue Oct 26 21:40:57 CEST 1999 ...@@ -1132,7 +1160,7 @@ Tue Oct 26 21:40:57 CEST 1999
</tip> </tip>
<note> <note>
<para> <para>
See the description of the <envar>LO_TRANSACTION</envar> See the description of the <varname>LO_TRANSACTION</varname>
variable for important information concerning all large object variable for important information concerning all large object
operations. operations.
</para> </para>
...@@ -1169,7 +1197,7 @@ lo_import 152801 ...@@ -1169,7 +1197,7 @@ lo_import 152801
<note> <note>
<para> <para>
See the description of the <envar>LO_TRANSACTION</envar> See the description of the <varname>LO_TRANSACTION</varname>
variable for important information concerning all large object variable for important information concerning all large object
operations. operations.
</para> </para>
...@@ -1206,7 +1234,7 @@ lo_import 152801 ...@@ -1206,7 +1234,7 @@ lo_import 152801
</tip> </tip>
<note> <note>
<para> <para>
See the description of the <envar>LO_TRANSACTION</envar> See the description of the <varname>LO_TRANSACTION</varname>
variable for important information concerning all large object variable for important information concerning all large object
operations. operations.
</para> </para>
...@@ -1426,7 +1454,7 @@ lo_import 152801 ...@@ -1426,7 +1454,7 @@ lo_import 152801
<term><literal>pager</literal></term> <term><literal>pager</literal></term>
<listitem> <listitem>
<para> <para>
Toggles the use of a pager for query and psql help output. If the Toggles the use of a pager for query and <application>psql</> help output. If the
environment variable <envar>PAGER</envar> is set, the output environment variable <envar>PAGER</envar> is set, the output
is piped to the specified program. Otherwise a platform-dependent default (such as is piped to the specified program. Otherwise a platform-dependent default (such as
<filename>more</filename>) is used. <filename>more</filename>) is used.
...@@ -1775,7 +1803,7 @@ bar ...@@ -1775,7 +1803,7 @@ bar
such variables. A list of all specially treated variables follows. such variables. A list of all specially treated variables follows.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><envar>DBNAME</envar></term> <term><varname>DBNAME</varname></term>
<listitem> <listitem>
<para> <para>
The name of the database you are currently connected to. This is The name of the database you are currently connected to. This is
...@@ -1786,7 +1814,7 @@ bar ...@@ -1786,7 +1814,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>ECHO</envar></term> <term><varname>ECHO</varname></term>
<listitem> <listitem>
<para> <para>
If set to <quote><literal>all</literal></quote>, all lines If set to <quote><literal>all</literal></quote>, all lines
...@@ -1802,14 +1830,14 @@ bar ...@@ -1802,14 +1830,14 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>ECHO_HIDDEN</envar></term> <term><varname>ECHO_HIDDEN</varname></term>
<listitem> <listitem>
<para> <para>
When this variable is set and a backslash command queries the When this variable is set and a backslash command queries the
database, the query is first shown. This way you can study the database, the query is first shown. This way you can study the
<productname>PostgreSQL</productname> internals and provide <productname>PostgreSQL</productname> internals and provide
similar functionality in your own programs. If you set the similar functionality in your own programs. If you set the
variable to the value <quote>noexec</quote>, the queries are variable to the value <literal>noexec</literal>, the queries are
just shown but are not actually sent to the backend and just shown but are not actually sent to the backend and
executed. executed.
</para> </para>
...@@ -1817,7 +1845,7 @@ bar ...@@ -1817,7 +1845,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>ENCODING</envar></term> <term><varname>ENCODING</varname></term>
<listitem> <listitem>
<para> <para>
The current client multibyte encoding. If you are not set up to The current client multibyte encoding. If you are not set up to
...@@ -1828,7 +1856,7 @@ bar ...@@ -1828,7 +1856,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>HISTCONTROL</envar></term> <term><varname>HISTCONTROL</varname></term>
<listitem> <listitem>
<para> <para>
If this variable is set to <literal>ignorespace</literal>, If this variable is set to <literal>ignorespace</literal>,
...@@ -1849,7 +1877,7 @@ bar ...@@ -1849,7 +1877,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>HISTSIZE</envar></term> <term><varname>HISTSIZE</varname></term>
<listitem> <listitem>
<para> <para>
The number of commands to store in the command history. The The number of commands to store in the command history. The
...@@ -1865,7 +1893,7 @@ bar ...@@ -1865,7 +1893,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>HOST</envar></term> <term><varname>HOST</varname></term>
<listitem> <listitem>
<para> <para>
The database server host you are currently connected to. This is The database server host you are currently connected to. This is
...@@ -1876,15 +1904,16 @@ bar ...@@ -1876,15 +1904,16 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>IGNOREEOF</envar></term> <term><varname>IGNOREEOF</varname></term>
<listitem> <listitem>
<para> <para>
If unset, sending an EOF character (usually Control-D) to an If unset, sending an <acronym>EOF</> character (usually
interactive session of <application>psql</application> will <keycombo action="simul"><keycap>Control</><keycap>D</></>)
terminate the application. If set to a numeric value, that many to an interactive session of <application>psql</application>
EOF characters are ignored before the application terminates. will terminate the application. If set to a numeric value,
If the variable is set but has no numeric value, the default is that many <acronym>EOF</> characters are ignored before the
10. application terminates. If the variable is set but has no
numeric value, the default is 10.
</para> </para>
<note> <note>
<para> <para>
...@@ -1896,10 +1925,10 @@ bar ...@@ -1896,10 +1925,10 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>LASTOID</envar></term> <term><varname>LASTOID</varname></term>
<listitem> <listitem>
<para> <para>
The value of the last affected oid, as returned from an The value of the last affected OID, as returned from an
<command>INSERT</command> or <command>lo_insert</command> <command>INSERT</command> or <command>lo_insert</command>
command. This variable is only guaranteed to be valid until command. This variable is only guaranteed to be valid until
after the result of the next <acronym>SQL</acronym> command has after the result of the next <acronym>SQL</acronym> command has
...@@ -1909,7 +1938,7 @@ bar ...@@ -1909,7 +1938,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>LO_TRANSACTION</envar></term> <term><varname>LO_TRANSACTION</varname></term>
<listitem> <listitem>
<para> <para>
If you use the <productname>PostgreSQL</productname> large If you use the <productname>PostgreSQL</productname> large
...@@ -1943,7 +1972,7 @@ bar ...@@ -1943,7 +1972,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>ON_ERROR_STOP</envar></term> <term><varname>ON_ERROR_STOP</varname></term>
<listitem> <listitem>
<para> <para>
By default, if non-interactive scripts encounter an error, such By default, if non-interactive scripts encounter an error, such
...@@ -1963,7 +1992,7 @@ bar ...@@ -1963,7 +1992,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>PORT</envar></term> <term><varname>PORT</varname></term>
<listitem> <listitem>
<para> <para>
The database server port to which you are currently connected. The database server port to which you are currently connected.
...@@ -1974,7 +2003,9 @@ bar ...@@ -1974,7 +2003,9 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>PROMPT1</envar>, <envar>PROMPT2</envar>, <envar>PROMPT3</envar></term> <term><varname>PROMPT1</varname></term>
<term><varname>PROMPT2</varname></term>
<term><varname>PROMPT3</varname></term>
<listitem> <listitem>
<para> <para>
These specify what the prompt <application>psql</application> These specify what the prompt <application>psql</application>
...@@ -1986,7 +2017,7 @@ bar ...@@ -1986,7 +2017,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>QUIET</envar></term> <term><varname>QUIET</varname></term>
<listitem> <listitem>
<para> <para>
This variable is equivalent to the command line option This variable is equivalent to the command line option
...@@ -1997,7 +2028,7 @@ bar ...@@ -1997,7 +2028,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>SINGLELINE</envar></term> <term><varname>SINGLELINE</varname></term>
<listitem> <listitem>
<para> <para>
This variable is set by the command line option This variable is set by the command line option
...@@ -2007,7 +2038,7 @@ bar ...@@ -2007,7 +2038,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>SINGLESTEP</envar></term> <term><varname>SINGLESTEP</varname></term>
<listitem> <listitem>
<para> <para>
This variable is equivalent to the command line option This variable is equivalent to the command line option
...@@ -2017,7 +2048,7 @@ bar ...@@ -2017,7 +2048,7 @@ bar
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><envar>USER</envar></term> <term><varname>USER</varname></term>
<listitem> <listitem>
<para> <para>
The database user you are currently connected as. This is set The database user you are currently connected as. This is set
...@@ -2105,8 +2136,8 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\' ...@@ -2105,8 +2136,8 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
<para> <para>
The prompts <application>psql</application> issues can be customized The prompts <application>psql</application> issues can be customized
to your preference. The three variables <envar>PROMPT1</envar>, to your preference. The three variables <varname>PROMPT1</varname>,
<envar>PROMPT2</envar>, and <envar>PROMPT3</envar> contain strings <varname>PROMPT2</varname>, and <varname>PROMPT3</varname> contain strings
and special escape sequences that describe the appearance of the and special escape sequences that describe the appearance of the
prompt. Prompt 1 is the normal prompt that is issued when prompt. Prompt 1 is the normal prompt that is issued when
<application>psql</application> requests a new query. Prompt 2 is <application>psql</application> requests a new query. Prompt 2 is
...@@ -2251,11 +2282,11 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\' ...@@ -2251,11 +2282,11 @@ testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\'
</refsect3> </refsect3>
<refsect3> <refsect3>
<title>Readline</title> <title>Command-Line Editing</title>
<para> <para>
<application>psql</application> supports the readline and history <application>psql</application> supports the <application>Readline</application>
libraries for convenient line editing and retrieval. The command library for convenient line editing and retrieval. The command
history is stored in a file named <filename>.psql_history</filename> history is stored in a file named <filename>.psql_history</filename>
in your home directory and is reloaded when in your home directory and is reloaded when
<application>psql</application> starts up. Tab-completion is also <application>psql</application> starts up. Tab-completion is also
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.12 2002/06/23 03:45:15 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.13 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -193,14 +193,15 @@ REINDEX ...@@ -193,14 +193,15 @@ REINDEX
as there is in <application>psql</>. To continue a command as there is in <application>psql</>. To continue a command
across multiple lines, you must type backslash just before each across multiple lines, you must type backslash just before each
newline except the last one. newline except the last one.
Also, you won't have any of the conveniences of readline processing Also, you won't have any of the conveniences of command-line editing
(no command history, for example). (no command history, for example).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
To quit the backend, type EOF (control-D, usually). To quit the backend, type <acronym>EOF</> (<keycombo
action="simul"><keycap>Control</><keycap>D</></>, usually).
</para> </para>
</listitem> </listitem>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.14 2002/05/17 01:19:16 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.15 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -79,7 +79,7 @@ SET <replaceable class="parameter">variable</replaceable> TO DEFAULT ...@@ -79,7 +79,7 @@ SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>
<para> <para>
Set DateStyle to its default value: Set <varname>DateStyle</> to its default value:
<screen> <screen>
RESET DateStyle; RESET DateStyle;
...@@ -87,7 +87,7 @@ RESET DateStyle; ...@@ -87,7 +87,7 @@ RESET DateStyle;
</para> </para>
<para> <para>
Set Geqo to its default value: Set <varname>geqo</> to its default value:
<screen> <screen>
RESET GEQO; RESET GEQO;
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.60 2002/08/30 16:00:41 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.61 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -451,8 +451,8 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be: ...@@ -451,8 +451,8 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be:
(i.e., all combined rows that pass its ON condition), plus one copy of each (i.e., all combined rows that pass its ON condition), plus one copy of each
row in the left-hand table for which there was no right-hand row that row in the left-hand table for which there was no right-hand row that
passed the ON condition. This left-hand row is extended to the full passed the ON condition. This left-hand row is extended to the full
width of the joined table by inserting NULLs for the right-hand columns. width of the joined table by inserting null values for the right-hand columns.
Note that only the JOIN's own ON or USING condition is considered while Note that only the <literal>JOIN</>'s own ON or USING condition is considered while
deciding which rows have matches. Outer ON or WHERE conditions are deciding which rows have matches. Outer ON or WHERE conditions are
applied afterwards. applied afterwards.
</para> </para>
...@@ -647,11 +647,13 @@ SELECT name FROM distributors ORDER BY code; ...@@ -647,11 +647,13 @@ SELECT name FROM distributors ORDER BY code;
</para> </para>
<para> <para>
Optionally one may add the keyword DESC (descending) Optionally one may add the key word <literal>DESC</> (descending)
or ASC (ascending) after each column name in the ORDER BY clause. or <literal>ASC</> (ascending) after each column name in the
If not specified, ASC is assumed by default. Alternatively, a <literal>ORDER BY</> clause. If not specified, <literal>ASC</> is
specific ordering operator name may be specified. ASC is equivalent assumed by default. Alternatively, a specific ordering operator
to USING &lt; and DESC is equivalent to USING &gt;. name may be specified. <literal>ASC</> is equivalent to
<literal>USING &lt;</> and <literal>DESC</> is equivalent to
<literal>USING &gt;</>.
</para> </para>
<para> <para>
...@@ -689,7 +691,7 @@ SELECT name FROM distributors ORDER BY code; ...@@ -689,7 +691,7 @@ SELECT name FROM distributors ORDER BY code;
<para> <para>
The UNION operator computes the collection (set union) of the rows The UNION operator computes the collection (set union) of the rows
returned by the queries involved. returned by the queries involved.
The two SELECTs that represent the direct operands of the UNION must The two SELECT statements that represent the direct operands of the UNION must
produce the same number of columns, and corresponding columns must be produce the same number of columns, and corresponding columns must be
of compatible data types. of compatible data types.
</para> </para>
...@@ -1064,7 +1066,7 @@ SELECT * FROM distributors_2(111) AS (f1 int, f2 text); ...@@ -1064,7 +1066,7 @@ SELECT * FROM distributors_2(111) AS (f1 int, f2 text);
<para> <para>
<productname>PostgreSQL</productname> allows one to omit <productname>PostgreSQL</productname> allows one to omit
the <command>FROM</command> clause from a query. This feature the <command>FROM</command> clause from a query. This feature
was retained from the original PostQuel query language. It has was retained from the original PostQUEL query language. It has
a straightforward use to compute the results of simple expressions: a straightforward use to compute the results of simple expressions:
<programlisting> <programlisting>
...@@ -1075,7 +1077,7 @@ SELECT 2+2; ...@@ -1075,7 +1077,7 @@ SELECT 2+2;
4 4
</programlisting> </programlisting>
Some other DBMSes cannot do this except by introducing a dummy one-row Some other SQL databases cannot do this except by introducing a dummy one-row
table to do the select from. A less obvious use is to abbreviate a table to do the select from. A less obvious use is to abbreviate a
normal select from one or more tables: normal select from one or more tables:
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.64 2002/08/04 05:09:36 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.65 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -113,7 +113,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -113,7 +113,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>DATESTYLE</term> <term><varname>DATESTYLE</></term>
<listitem> <listitem>
<para> <para>
Choose the date/time representation style. Two separate Choose the date/time representation style. Two separate
...@@ -126,7 +126,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -126,7 +126,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>ISO</term> <term><literal>ISO</></term>
<listitem> <listitem>
<para> <para>
Use ISO 8601-style dates and times (<literal>YYYY-MM-DD Use ISO 8601-style dates and times (<literal>YYYY-MM-DD
...@@ -136,7 +136,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -136,7 +136,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>SQL</term> <term><literal>SQL</></term>
<listitem> <listitem>
<para> <para>
Use Oracle/Ingres-style dates and times. Note that this Use Oracle/Ingres-style dates and times. Note that this
...@@ -147,7 +147,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -147,7 +147,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>PostgreSQL</term> <term><literal>PostgreSQL</></term>
<listitem> <listitem>
<para> <para>
Use traditional <productname>PostgreSQL</productname> format. Use traditional <productname>PostgreSQL</productname> format.
...@@ -156,7 +156,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -156,7 +156,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>German</term> <term><literal>German</></term>
<listitem> <listitem>
<para> <para>
Use <literal>dd.mm.yyyy</literal> for numeric date representations. Use <literal>dd.mm.yyyy</literal> for numeric date representations.
...@@ -173,7 +173,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -173,7 +173,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>European</term> <term><literal>European</></term>
<listitem> <listitem>
<para> <para>
Use <literal>dd/mm/yyyy</literal> for numeric date representations. Use <literal>dd/mm/yyyy</literal> for numeric date representations.
...@@ -182,8 +182,8 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -182,8 +182,8 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>NonEuropean</term> <term><literal>NonEuropean</></term>
<term>US</term> <term><literal>US</></term>
<listitem> <listitem>
<para> <para>
Use <literal>mm/dd/yyyy</literal> for numeric date representations. Use <literal>mm/dd/yyyy</literal> for numeric date representations.
...@@ -209,7 +209,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -209,7 +209,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</para> </para>
<para> <para>
There are several now-deprecated means for setting the datestyle There are several now-deprecated means for setting the date style
in addition to the normal methods of setting it via <command>SET</> or in addition to the normal methods of setting it via <command>SET</> or
a configuration-file entry: a configuration-file entry:
<simplelist> <simplelist>
...@@ -225,9 +225,9 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep ...@@ -225,9 +225,9 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
</member> </member>
<member> <member>
Setting the client's <envar>PGDATESTYLE</envar> environment variable. Setting the client's <envar>PGDATESTYLE</envar> environment variable.
If PGDATESTYLE is set in the frontend environment of a client If <envar>PGDATESTYLE</envar> is set in the frontend environment of a client
based on libpq, libpq will automatically set DATESTYLE to the based on <application>libpq</>, <application>libpq</> will automatically set <varname>DATESTYLE</> to the
value of PGDATESTYLE during connection start-up. This is value of <envar>PGDATESTYLE</envar> during connection start-up. This is
equivalent to a manually issued <command>SET DATESTYLE</>. equivalent to a manually issued <command>SET DATESTYLE</>.
</member> </member>
</simplelist> </simplelist>
...@@ -283,7 +283,7 @@ SELECT setseed(<replaceable>value</replaceable>); ...@@ -283,7 +283,7 @@ SELECT setseed(<replaceable>value</replaceable>);
<para> <para>
Shows the server-side multibyte encoding. (At present, this Shows the server-side multibyte encoding. (At present, this
parameter can be shown but not set, because the encoding is parameter can be shown but not set, because the encoding is
determined at initdb time.) determined at <application>initdb</> time.)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -373,7 +373,7 @@ SELECT setseed(<replaceable>value</replaceable>); ...@@ -373,7 +373,7 @@ SELECT setseed(<replaceable>value</replaceable>);
<para> <para>
If the <envar>PGTZ</envar> environment variable is set in the frontend If the <envar>PGTZ</envar> environment variable is set in the frontend
environment of a client based on libpq, libpq will automatically environment of a client based on <application>libpq</>, <application>libpq</> will automatically
<command>SET TIMEZONE</command> to the value of <command>SET TIMEZONE</command> to the value of
<envar>PGTZ</envar> during connection start-up. <envar>PGTZ</envar> during connection start-up.
</para> </para>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.6 2002/05/17 01:19:16 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.7 2002/09/21 18:32:54 petere Exp $ -->
<refentry id="SQL-SET-SESSION-AUTHORIZATION"> <refentry id="SQL-SET-SESSION-AUTHORIZATION">
<docinfo> <docinfo>
<date>2001-04-21</date> <date>2001-04-21</date>
...@@ -48,7 +48,7 @@ RESET SESSION AUTHORIZATION ...@@ -48,7 +48,7 @@ RESET SESSION AUTHORIZATION
The session user identifier may be changed only if the initial session The session user identifier may be changed only if the initial session
user (the <firstterm>authenticated user</firstterm>) had the user (the <firstterm>authenticated user</firstterm>) had the
superuser privilege. Otherwise, the command is accepted only if it superuser privilege. Otherwise, the command is accepted only if it
specifies the authenticated username. specifies the authenticated user name.
</para> </para>
<para> <para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.19 2002/08/13 20:40:44 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/unlisten.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -90,7 +90,7 @@ UNLISTEN { <replaceable class="PARAMETER">notifyname</replaceable> | * } ...@@ -90,7 +90,7 @@ UNLISTEN { <replaceable class="PARAMETER">notifyname</replaceable> | * }
<para> <para>
<command>UNLISTEN</command> <command>UNLISTEN</command>
is used to remove an existing <command>NOTIFY</command> registration. is used to remove an existing <command>NOTIFY</command> registration.
UNLISTEN cancels any existing registration of the current <command>UNLISTEN</command> cancels any existing registration of the current
<productname>PostgreSQL</productname> session as a listener on the notify <productname>PostgreSQL</productname> session as a listener on the notify
condition <replaceable class="PARAMETER">notifyname</replaceable>. condition <replaceable class="PARAMETER">notifyname</replaceable>.
The special condition wildcard <literal>*</literal> cancels all listener registrations The special condition wildcard <literal>*</literal> cancels all listener registrations
...@@ -117,7 +117,7 @@ UNLISTEN { <replaceable class="PARAMETER">notifyname</replaceable> | * } ...@@ -117,7 +117,7 @@ UNLISTEN { <replaceable class="PARAMETER">notifyname</replaceable> | * }
as a name up to 64 characters long. as a name up to 64 characters long.
</para> </para>
<para> <para>
The backend does not complain if you UNLISTEN something you were not The backend does not complain if you unlisten something you were not
listening for. listening for.
Each backend will automatically execute <command>UNLISTEN *</command> when Each backend will automatically execute <command>UNLISTEN *</command> when
exiting. exiting.
...@@ -143,7 +143,7 @@ Asynchronous NOTIFY 'virtual' from backend with pid '8448' received ...@@ -143,7 +143,7 @@ Asynchronous NOTIFY 'virtual' from backend with pid '8448' received
</para> </para>
<para> <para>
Once UNLISTEN has been executed, further NOTIFY commands will be Once <command>UNLISTEN</> has been executed, further <command>NOTIFY</> commands will be
ignored: ignored:
<programlisting> <programlisting>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.25 2002/04/23 02:07:16 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.26 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -162,7 +162,7 @@ INFO: Index <replaceable class="PARAMETER">index</replaceable>: Pages 28; ...@@ -162,7 +162,7 @@ INFO: Index <replaceable class="PARAMETER">index</replaceable>: Pages 28;
<para> <para>
<command>VACUUM</command> reclaims storage occupied by deleted tuples. <command>VACUUM</command> reclaims storage occupied by deleted tuples.
In normal <productname>PostgreSQL</productname> operation, tuples that In normal <productname>PostgreSQL</productname> operation, tuples that
are DELETEd or obsoleted by UPDATE are not physically removed from are deleted or obsoleted by UPDATE are not physically removed from
their table; they remain present until a <command>VACUUM</command> is their table; they remain present until a <command>VACUUM</command> is
done. Therefore it's necessary to do <command>VACUUM</command> done. Therefore it's necessary to do <command>VACUUM</command>
periodically, especially on frequently-updated tables. periodically, especially on frequently-updated tables.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.25 2002/09/05 22:05:50 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.26 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -79,8 +79,8 @@ PostgreSQL documentation ...@@ -79,8 +79,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-d <replaceable class="parameter">dbname</replaceable></term> <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term>
<term>--dbname <replaceable class="parameter">dbname</replaceable></term> <term><option>--dbname <replaceable class="parameter">dbname</replaceable></option></term>
<listitem> <listitem>
<para> <para>
Specifies the name of the database to be cleaned or analyzed. Specifies the name of the database to be cleaned or analyzed.
...@@ -94,8 +94,8 @@ PostgreSQL documentation ...@@ -94,8 +94,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-a</term> <term><option>-a</option></term>
<term>--all</term> <term><option>--all</option></term>
<listitem> <listitem>
<para> <para>
Vacuum all databases. Vacuum all databases.
...@@ -104,8 +104,8 @@ PostgreSQL documentation ...@@ -104,8 +104,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-f</term> <term><option>-f</option></term>
<term>--full</term> <term><option>--full</option></term>
<listitem> <listitem>
<para> <para>
Perform <quote>full</quote> vacuuming. Perform <quote>full</quote> vacuuming.
...@@ -114,8 +114,8 @@ PostgreSQL documentation ...@@ -114,8 +114,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-v</term> <term><option>-v</option></term>
<term>--verbose</term> <term><option>--verbose</option></term>
<listitem> <listitem>
<para> <para>
Print detailed information during processing. Print detailed information during processing.
...@@ -124,8 +124,8 @@ PostgreSQL documentation ...@@ -124,8 +124,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-z</term> <term><option>-z</option></term>
<term>--analyze</term> <term><option>--analyze</option></term>
<listitem> <listitem>
<para> <para>
Calculate statistics for use by the optimizer. Calculate statistics for use by the optimizer.
...@@ -134,8 +134,8 @@ PostgreSQL documentation ...@@ -134,8 +134,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-t <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</term> <term><option>-t <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</option></term>
<term>--table <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</term> <term><option>--table <replaceable class="parameter">table</replaceable> [ (<replaceable class="parameter">column</replaceable> [,...]) ]</option></term>
<listitem> <listitem>
<para> <para>
Clean or analyze <replaceable class="parameter">table</replaceable> only. Clean or analyze <replaceable class="parameter">table</replaceable> only.
...@@ -160,8 +160,8 @@ PostgreSQL documentation ...@@ -160,8 +160,8 @@ PostgreSQL documentation
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>-h <replaceable class="parameter">host</replaceable></term> <term><option>-h <replaceable class="parameter">host</replaceable></></term>
<term>--host <replaceable class="parameter">host</replaceable></term> <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the host name of the machine on which the Specifies the host name of the machine on which the
...@@ -173,8 +173,8 @@ PostgreSQL documentation ...@@ -173,8 +173,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-p <replaceable class="parameter">port</replaceable></term> <term><option>-p <replaceable class="parameter">port</replaceable></></term>
<term>--port <replaceable class="parameter">port</replaceable></term> <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem> <listitem>
<para> <para>
Specifies the Internet TCP/IP port or local Unix domain socket file Specifies the Internet TCP/IP port or local Unix domain socket file
...@@ -185,8 +185,8 @@ PostgreSQL documentation ...@@ -185,8 +185,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-U <replaceable class="parameter">username</replaceable></term> <term><option>-U <replaceable class="parameter">username</replaceable></></term>
<term>--username <replaceable class="parameter">username</replaceable></term> <term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem> <listitem>
<para> <para>
User name to connect as User name to connect as
...@@ -195,8 +195,8 @@ PostgreSQL documentation ...@@ -195,8 +195,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-W</term> <term><option>-W</></term>
<term>--password</term> <term><option>--password</></term>
<listitem> <listitem>
<para> <para>
Force password prompt. Force password prompt.
...@@ -205,8 +205,8 @@ PostgreSQL documentation ...@@ -205,8 +205,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-e</term> <term><option>-e</></term>
<term>--echo</term> <term><option>--echo</></term>
<listitem> <listitem>
<para> <para>
Echo the commands that <application>vacuumdb</application> generates Echo the commands that <application>vacuumdb</application> generates
...@@ -216,8 +216,8 @@ PostgreSQL documentation ...@@ -216,8 +216,8 @@ PostgreSQL documentation
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>-q</term> <term><option>-q</></term>
<term>--quiet</term> <term><option>--quiet</></term>
<listitem> <listitem>
<para> <para>
Do not display a response. Do not display a response.
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.27 2002/05/14 13:05:42 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.28 2002/09/21 18:32:53 petere Exp $ -->
<chapter id="regress"> <chapter id="regress">
<title id="regress-title">Regression Tests</title> <title id="regress-title">Regression Tests</title>
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
<para> <para>
The parallel regression test starts quite a few processes under your The parallel regression test starts quite a few processes under your
user ID. Presently, the maximum concurrency is twenty parallel test user ID. Presently, the maximum concurrency is twenty parallel test
scripts, which means sixty processes --- there's a backend, a psql, scripts, which means sixty processes --- there's a backend, a <application>psql</>,
and usually a shell parent process for the psql for each test script. and usually a shell parent process for the <application>psql</> for each test script.
So if your system enforces a per-user limit on the number of processes, So if your system enforces a per-user limit on the number of processes,
make sure this limit is at least seventy-five or so, else you may get make sure this limit is at least seventy-five or so, else you may get
random-seeming failures in the parallel test. If you are not in random-seeming failures in the parallel test. If you are not in
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
problem by providing alternative result files that together are problem by providing alternative result files that together are
known to handle a large number of locales. For example, for the known to handle a large number of locales. For example, for the
<quote>char</quote> test, the expected file <quote>char</quote> test, the expected file
<filename>char.out</filename> handles the C and POSIX locales, <filename>char.out</filename> handles the <literal>C</> and <literal>POSIX</> locales,
and the file <filename>char_1.out</filename> handles many other and the file <filename>char_1.out</filename> handles many other
locales. The regression test driver will automatically pick the locales. The regression test driver will automatically pick the
best file to match against when checking for success and for best file to match against when checking for success and for
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.159 2002/09/18 21:35:20 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.160 2002/09/21 18:32:53 petere Exp $
--> -->
<appendix id="release"> <appendix id="release">
...@@ -598,7 +598,7 @@ Reject invalid multibyte character sequences (Tatsuo) ...@@ -598,7 +598,7 @@ Reject invalid multibyte character sequences (Tatsuo)
</sect3> </sect3>
<sect3> <sect3>
<title>PL/pgSQL</title> <title><application>PL/pgSQL</></title>
<literallayout> <literallayout>
Now uses portals for SELECT loops, allowing huge result sets (Jan) Now uses portals for SELECT loops, allowing huge result sets (Jan)
CURSOR and REFCURSOR support (Jan) CURSOR and REFCURSOR support (Jan)
...@@ -638,7 +638,7 @@ Add spi_lastoid function (bob@redivi.com) ...@@ -638,7 +638,7 @@ Add spi_lastoid function (bob@redivi.com)
</sect3> </sect3>
<sect3> <sect3>
<title>Psql</title> <title><application>Psql</></title>
<literallayout> <literallayout>
\d displays indexes in unique, primary groupings (Christopher Kings-Lynne) \d displays indexes in unique, primary groupings (Christopher Kings-Lynne)
Allow trailing semicolons in backslash commands (Greg Sabino Mullane) Allow trailing semicolons in backslash commands (Greg Sabino Mullane)
...@@ -649,7 +649,7 @@ Format the correct number of columns for Unicode (Patrice) ...@@ -649,7 +649,7 @@ Format the correct number of columns for Unicode (Patrice)
</sect3> </sect3>
<sect3> <sect3>
<title>Libpq</title> <title><application>Libpq</></title>
<literallayout> <literallayout>
New function PQescapeString() to escape quotes in command strings (Florian Weimer) New function PQescapeString() to escape quotes in command strings (Florian Weimer)
New function PQescapeBytea() escapes binary strings for use as SQL string literals New function PQescapeBytea() escapes binary strings for use as SQL string literals
...@@ -711,7 +711,7 @@ Add more compatibility functions to odbc.sql (Peter E) ...@@ -711,7 +711,7 @@ Add more compatibility functions to odbc.sql (Peter E)
</sect3> </sect3>
<sect3> <sect3>
<title>ECPG</title> <title><application>ECPG</></title>
<literallayout> <literallayout>
EXECUTE ... INTO implemented (Christof Petig) EXECUTE ... INTO implemented (Christof Petig)
Multiple row descriptor support (e.g. CARDINALITY) (Christof Petig) Multiple row descriptor support (e.g. CARDINALITY) (Christof Petig)
...@@ -981,7 +981,7 @@ outer join syntax. ...@@ -981,7 +981,7 @@ outer join syntax.
<listitem> <listitem>
<para> <para>
The previous C function manager did not The previous C function manager did not
handle NULLs properly, nor did it support 64-bit <acronym>CPU</acronym>'s (Alpha). The new handle null values properly, nor did it support 64-bit <acronym>CPU</acronym>'s (Alpha). The new
function manager does. You can continue using your old custom function manager does. You can continue using your old custom
functions, but you may want to rewrite them in the future to use the new functions, but you may want to rewrite them in the future to use the new
function manager call interface. function manager call interface.
...@@ -1438,9 +1438,11 @@ ecpg changes (Michael) ...@@ -1438,9 +1438,11 @@ ecpg changes (Michael)
</term> </term>
<listitem> <listitem>
<para> <para>
SQL92 join syntax is now supported, though only as INNER JOINs SQL92 join syntax is now supported, though only as
for this release. JOIN, NATURAL JOIN, JOIN/USING, JOIN/ON are <literal>INNER JOIN</> for this release. <literal>JOIN</>,
available, as are column correlation names. <literal>NATURAL JOIN</>, <literal>JOIN</>/<literal>USING</>,
and <literal>JOIN</>/<literal>ON</> are available, as are
column correlation names.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -2530,7 +2532,7 @@ original <application>PL/pgTCL</application> procedural language he contributed ...@@ -2530,7 +2532,7 @@ original <application>PL/pgTCL</application> procedural language he contributed
<listitem> <listitem>
<para> <para>
We have optional multiple-byte character set support from Tatsuo Iishi We have optional multiple-byte character set support from Tatsuo Ishii
to complement our existing locale support. to complement our existing locale support.
</para> </para>
</listitem> </listitem>
...@@ -3592,10 +3594,11 @@ optimizer which uses <firstterm>genetic</firstterm> ...@@ -3592,10 +3594,11 @@ optimizer which uses <firstterm>genetic</firstterm>
</para> </para>
<para> <para>
The "random" results in the random test should cause the "random" test The <quote>random</> results in the random test should cause the
to be "failed", since the regression tests are evaluated using a simple <quote>random</quote> test to be <quote>failed</quote>, since the
diff. However, "random" does not seem to produce random results on my regression tests are evaluated using a simple diff. However,
test machine (Linux/gcc/i686). <quote>random</> does not seem to produce random results on my test
machine (Linux/<application>gcc</>/i686).
</para> </para>
<sect2> <sect2>
...@@ -3946,7 +3949,7 @@ than NULL. See the copy manual page for full details. ...@@ -3946,7 +3949,7 @@ than NULL. See the copy manual page for full details.
</programlisting> </programlisting>
</para> </para>
<para> <para>
If you are loading an older binary copy or non-stdout copy, there is no If you are loading an older binary copy or non-<systemitem>stdout</> copy, there is no
end-of-data character, and hence no conversion necessary. end-of-data character, and hence no conversion necessary.
<programlisting> <programlisting>
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.23 2002/04/19 23:13:53 tgl Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.24 2002/09/21 18:32:53 petere Exp $ -->
<Chapter Id="rules"> <Chapter Id="rules">
<Title>The Rule System</Title> <Title>The Rule System</Title>
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
<Para> <Para>
DELETE queries don't need a target list because they don't DELETE queries don't need a target list because they don't
produce any result. In fact the planner will add a special CTID produce any result. In fact the planner will add a special <acronym>CTID</>
entry to the empty target list. But this is after the rule entry to the empty target list. But this is after the rule
system and will be discussed later. For the rule system the system and will be discussed later. For the rule system the
target list is empty. target list is empty.
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
expressions from the SET attribute = expression part of the query. expressions from the SET attribute = expression part of the query.
The planner will add missing columns by inserting expressions that The planner will add missing columns by inserting expressions that
copy the values from the old row into the new one. And it will add copy the values from the old row into the new one. And it will add
the special CTID entry just as for DELETE too. the special <acronym>CTID</> entry just as for DELETE too.
</Para> </Para>
<Para> <Para>
...@@ -781,24 +781,25 @@ SELECT t1.a, t2.b FROM t1, t2 WHERE t1.a = t2.a; ...@@ -781,24 +781,25 @@ SELECT t1.a, t2.b FROM t1, t2 WHERE t1.a = t2.a;
<Para> <Para>
To resolve this problem, another entry is added to the target list To resolve this problem, another entry is added to the target list
in UPDATE (and also in DELETE) statements: the current tuple ID (CTID). in UPDATE (and also in DELETE) statements: the current tuple ID (<acronym>CTID</>).
This is a system attribute containing the file This is a system attribute containing the file
block number and position in the block for the row. Knowing the table, block number and position in the block for the row. Knowing the table,
the CTID can be used to retrieve the original t1 row to be updated. the <acronym>CTID</> can be used to retrieve the original t1 row to be updated.
After adding the CTID to the target list, the query actually looks like After adding the <acronym>CTID</> to the target list, the query actually looks like
<ProgramListing> <ProgramListing>
SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a; SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
</ProgramListing> </ProgramListing>
Now another detail of <ProductName>PostgreSQL</ProductName> enters the Now another detail of <ProductName>PostgreSQL</ProductName> enters
stage. At this moment, table rows aren't overwritten and this is why the stage. At this moment, table rows aren't overwritten and this
ABORT TRANSACTION is fast. In an UPDATE, the new result row is inserted is why ABORT TRANSACTION is fast. In an UPDATE, the new result row
into the table (after stripping CTID) and in the tuple header of the row is inserted into the table (after stripping <acronym>CTID</>) and
that CTID pointed to the cmax and xmax entries are set to the current in the tuple header of the row that <acronym>CTID</> pointed to
command counter and current transaction ID. Thus the old row is hidden the <literal>cmax</> and <literal>xmax</> entries are set to the
and after the transaction committed the vacuum cleaner can really move current command counter and current transaction ID. Thus the old
it out. row is hidden and after the transaction committed the vacuum
cleaner can really move it out.
</Para> </Para>
<Para> <Para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.137 2002/09/18 20:09:32 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.138 2002/09/21 18:32:53 petere Exp $
--> -->
<Chapter Id="runtime"> <Chapter Id="runtime">
...@@ -528,7 +528,7 @@ postmaster -c log_connections=yes -c syslog=2 ...@@ -528,7 +528,7 @@ postmaster -c log_connections=yes -c syslog=2
<programlisting> <programlisting>
env PGOPTIONS='-c geqo=off' psql env PGOPTIONS='-c geqo=off' psql
</programlisting> </programlisting>
(This works for any libpq-based client application, not just (This works for any <application>libpq</>-based client application, not just
<application>psql</application>.) Note that this won't work for <application>psql</application>.) Note that this won't work for
options that are fixed when the server is started, such as the port options that are fixed when the server is started, such as the port
number. number.
...@@ -1002,7 +1002,7 @@ env PGOPTIONS='-c geqo=off' psql ...@@ -1002,7 +1002,7 @@ env PGOPTIONS='-c geqo=off' psql
<listitem> <listitem>
<para> <para>
Determines whether <command>EXPLAIN VERBOSE</> uses the indented Determines whether <command>EXPLAIN VERBOSE</> uses the indented
or non-indented format for displaying detailed querytree dumps. or non-indented format for displaying detailed query-tree dumps.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -1058,10 +1058,10 @@ env PGOPTIONS='-c geqo=off' psql ...@@ -1058,10 +1058,10 @@ env PGOPTIONS='-c geqo=off' psql
<term><varname>LOG_PID</varname> (<type>boolean</type>)</term> <term><varname>LOG_PID</varname> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
Prefixes each server message in the logfile with the process ID of Prefixes each server message in the log file with the process ID of
the backend process. This is useful to sort out which messages the backend process. This is useful to sort out which messages
pertain to which connection. The default is off. This parameter pertain to which connection. The default is off. This parameter
does not affect messages logged via syslog(), which always contain does not affect messages logged via <application>syslog</>, which always contain
the process ID. the process ID.
</para> </para>
</listitem> </listitem>
...@@ -1669,7 +1669,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' ...@@ -1669,7 +1669,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
<listitem> <listitem>
<para> <para>
This variable specifies the order in which namespaces are searched This variable specifies the order in which namespaces are searched
when an object (table, datatype, function, etc) is referenced by a when an object (table, data type, function, etc) is referenced by a
simple name with no schema component. When there are objects of simple name with no schema component. When there are objects of
identical names in different namespaces, the one found first identical names in different namespaces, the one found first
in the search path is used. An object that is not in any of the in the search path is used. An object that is not in any of the
...@@ -1865,7 +1865,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' ...@@ -1865,7 +1865,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
However, filtered forms in <productname>Microsoft However, filtered forms in <productname>Microsoft
Access</productname> generate queries that appear to use Access</productname> generate queries that appear to use
<literal><replaceable>expr</> = NULL</literal> to test for <literal><replaceable>expr</> = NULL</literal> to test for
NULLs, so if you use that interface to access the database you null values, so if you use that interface to access the database you
might want to turn this option on. Since expressions of the might want to turn this option on. Since expressions of the
form <literal><replaceable>expr</> = NULL</literal> always form <literal><replaceable>expr</> = NULL</literal> always
return NULL (using the correct interpretation) they are not return NULL (using the correct interpretation) they are not
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.69 2002/09/12 22:05:36 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.70 2002/09/21 18:32:54 petere Exp $
--> -->
<chapter id="sql-syntax"> <chapter id="sql-syntax">
...@@ -715,19 +715,19 @@ SELECT (5 !) - 6; ...@@ -715,19 +715,19 @@ SELECT (5 !) - 6;
<row> <row>
<entry><token>IS</token></entry> <entry><token>IS</token></entry>
<entry></entry> <entry></entry>
<entry>test for TRUE, FALSE, UNKNOWN, NULL</entry> <entry><literal>IS TRUE</>, <literal>IS FALSE</>, <literal>IS UNKNOWN</>, <literal>IS NULL</></entry>
</row> </row>
<row> <row>
<entry><token>ISNULL</token></entry> <entry><token>ISNULL</token></entry>
<entry></entry> <entry></entry>
<entry>test for NULL</entry> <entry>test for null</entry>
</row> </row>
<row> <row>
<entry><token>NOTNULL</token></entry> <entry><token>NOTNULL</token></entry>
<entry></entry> <entry></entry>
<entry>test for NOT NULL</entry> <entry>test for not null</entry>
</row> </row>
<row> <row>
...@@ -1042,13 +1042,13 @@ sqrt(2) ...@@ -1042,13 +1042,13 @@ sqrt(2)
<para> <para>
The first form of aggregate expression invokes the aggregate The first form of aggregate expression invokes the aggregate
across all input rows for which the given expression yields a across all input rows for which the given expression yields a
non-NULL value. (Actually, it is up to the aggregate function non-null value. (Actually, it is up to the aggregate function
whether to ignore NULLs or not --- but all the standard ones do.) whether to ignore null values or not --- but all the standard ones do.)
The second form is the same as the first, since The second form is the same as the first, since
<literal>ALL</literal> is the default. The third form invokes the <literal>ALL</literal> is the default. The third form invokes the
aggregate for all distinct non-NULL values of the expression found aggregate for all distinct non-null values of the expression found
in the input rows. The last form invokes the aggregate once for in the input rows. The last form invokes the aggregate once for
each input row regardless of NULL or non-NULL values; since no each input row regardless of null or non-null values; since no
particular input value is specified, it is generally only useful particular input value is specified, it is generally only useful
for the <function>count()</function> aggregate function. for the <function>count()</function> aggregate function.
</para> </para>
...@@ -1056,9 +1056,9 @@ sqrt(2) ...@@ -1056,9 +1056,9 @@ sqrt(2)
<para> <para>
For example, <literal>count(*)</literal> yields the total number For example, <literal>count(*)</literal> yields the total number
of input rows; <literal>count(f1)</literal> yields the number of of input rows; <literal>count(f1)</literal> yields the number of
input rows in which <literal>f1</literal> is non-NULL; input rows in which <literal>f1</literal> is non-null;
<literal>count(distinct f1)</literal> yields the number of <literal>count(distinct f1)</literal> yields the number of
distinct non-NULL values of <literal>f1</literal>. distinct non-null values of <literal>f1</literal>.
</para> </para>
<para> <para>
...@@ -1106,7 +1106,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> ...@@ -1106,7 +1106,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable>
to the type that a value expression must produce (for example, when it is to the type that a value expression must produce (for example, when it is
assigned to a table column); the system will automatically apply a assigned to a table column); the system will automatically apply a
type cast in such cases. However, automatic casting is only done for type cast in such cases. However, automatic casting is only done for
cast functions that are marked <quote>okay to apply implicitly</> cast functions that are marked <quote>OK to apply implicitly</>
in the system catalogs. Other cast functions must be invoked with in the system catalogs. Other cast functions must be invoked with
explicit casting syntax. This restriction is intended to prevent explicit casting syntax. This restriction is intended to prevent
surprising conversions from being applied silently. surprising conversions from being applied silently.
...@@ -1140,7 +1140,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable> ...@@ -1140,7 +1140,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable>
It is an error to use a query that It is an error to use a query that
returns more than one row or more than one column as a scalar subquery. returns more than one row or more than one column as a scalar subquery.
(But if, during a particular execution, the subquery returns no rows, (But if, during a particular execution, the subquery returns no rows,
there is no error; the scalar result is taken to be NULL.) there is no error; the scalar result is taken to be null.)
The subquery can refer to variables from the surrounding query, The subquery can refer to variables from the surrounding query,
which will act as constants during any one evaluation of the subquery. which will act as constants during any one evaluation of the subquery.
See also <xref linkend="functions-subquery">. See also <xref linkend="functions-subquery">.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.25 2002/09/21 18:32:54 petere Exp $
--> -->
<chapter id="triggers"> <chapter id="triggers">
<title>Triggers</title> <title>Triggers</title>
<para> <para>
<productname>PostgreSQL</productname> has various server-side function <productname>PostgreSQL</productname> has various server-side
interfaces. Server-side functions can be written in SQL, PL/pgSQL, function interfaces. Server-side functions can be written in SQL,
Tcl, or C. Trigger functions can be written in any of these C, or any defined procedural language. Trigger functions can be
languages except SQL. Note that statement-level trigger events are not written in C and most procedural languages, but not in SQL. Note that
supported in the current version. You can currently specify BEFORE or statement-level trigger events are not supported in the current
AFTER on INSERT, DELETE or UPDATE of a tuple as a trigger event. version. You can currently specify BEFORE or AFTER on INSERT,
DELETE or UPDATE of a tuple as a trigger event.
</para> </para>
<sect1 id="trigger-definition"> <sect1 id="trigger-definition">
...@@ -19,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl ...@@ -19,7 +20,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl
<para> <para>
If a trigger event occurs, the trigger manager (called by the Executor) If a trigger event occurs, the trigger manager (called by the Executor)
sets up a TriggerData information structure (described below) and calls sets up a <structname>TriggerData</> information structure (described below) and calls
the trigger function to handle the event. the trigger function to handle the event.
</para> </para>
...@@ -27,7 +28,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl ...@@ -27,7 +28,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl
The trigger function must be defined before the trigger itself can be The trigger function must be defined before the trigger itself can be
created. The trigger function must be declared as a created. The trigger function must be declared as a
function taking no arguments and returning type <literal>trigger</>. function taking no arguments and returning type <literal>trigger</>.
(The trigger function receives its input through a TriggerData (The trigger function receives its input through a <structname>TriggerData</>
structure, not in the form of ordinary function arguments.) structure, not in the form of ordinary function arguments.)
If the function is written in C, it must use the <quote>version 1</> If the function is written in C, it must use the <quote>version 1</>
function manager interface. function manager interface.
...@@ -36,12 +37,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl ...@@ -36,12 +37,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.24 2002/08/22 00:01:40 tgl
<para> <para>
The syntax for creating triggers is: The syntax for creating triggers is:
<programlisting> <programlisting>
CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | DELETE | UPDATE [ OR ... ] ] CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | DELETE | UPDATE [ OR ... ] ]
ON <replaceable>relation</replaceable> FOR EACH [ ROW | STATEMENT ] ON <replaceable>relation</replaceable> FOR EACH [ ROW | STATEMENT ]
EXECUTE PROCEDURE <replaceable>procedure</replaceable> EXECUTE PROCEDURE <replaceable>procedure</replaceable>
(<replaceable>args</replaceable>); (<replaceable>args</replaceable>);
</programlisting> </programlisting>
where the arguments are: where the arguments are:
...@@ -116,7 +117,7 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | ...@@ -116,7 +117,7 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT |
<term><replaceable>args</replaceable></term> <term><replaceable>args</replaceable></term>
<listitem> <listitem>
<para> <para>
The arguments passed to the function in the TriggerData structure. The arguments passed to the function in the <structname>TriggerData</> structure.
This is either empty or a list of one or more simple literal This is either empty or a list of one or more simple literal
constants (which will be passed to the function as strings). constants (which will be passed to the function as strings).
</para> </para>
...@@ -127,7 +128,7 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | ...@@ -127,7 +128,7 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT |
triggers with similar requirements to call the same function. triggers with similar requirements to call the same function.
As an example, there could be a generalized trigger As an example, there could be a generalized trigger
function that takes as its arguments two field names and puts the function that takes as its arguments two field names and puts the
current user in one and the current timestamp in the other. current user in one and the current time stamp in the other.
Properly written, this trigger function would be independent of Properly written, this trigger function would be independent of
the specific table it is triggering on. So the same function the specific table it is triggering on. So the same function
could be used for INSERT events on any table with suitable fields, could be used for INSERT events on any table with suitable fields,
...@@ -141,15 +142,16 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | ...@@ -141,15 +142,16 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT |
</para> </para>
<para> <para>
Trigger functions return a HeapTuple to the calling Executor. The return Trigger functions return a <structname>HeapTuple</> to the calling executor. The return
value is ignored for triggers fired AFTER an operation, value is ignored for triggers fired AFTER an operation,
but it allows BEFORE triggers to: but it allows BEFORE triggers to:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
Return NULL to skip the operation for the current tuple (and so the Return a <symbol>NULL</> pointer to skip the operation for the
tuple will not be inserted/updated/deleted). current tuple (and so the tuple will not be
inserted/updated/deleted).
</para> </para>
</listitem> </listitem>
...@@ -173,12 +175,12 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | ...@@ -173,12 +175,12 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT |
</para> </para>
<para> <para>
If more than one trigger If more than one trigger is defined for the same event on the same
is defined for the same event on the same relation, the triggers will relation, the triggers will be fired in alphabetical order by
be fired in alphabetical order by name. In the case of BEFORE triggers, name. In the case of BEFORE triggers, the possibly-modified tuple
the possibly-modified tuple returned by each trigger becomes the input returned by each trigger becomes the input to the next trigger.
to the next trigger. If any BEFORE trigger returns NULL, the operation If any BEFORE trigger returns <symbol>NULL</>, the operation is
is abandoned and subsequent triggers are not fired. abandoned and subsequent triggers are not fired.
</para> </para>
<para> <para>
...@@ -207,24 +209,24 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT | ...@@ -207,24 +209,24 @@ CREATE TRIGGER <replaceable>trigger</replaceable> [ BEFORE | AFTER ] [ INSERT |
<para> <para>
The interface described here applies for The interface described here applies for
<productname>PostgreSQL</productname> 7.1 and later. <productname>PostgreSQL</productname> 7.1 and later.
Earlier versions passed the TriggerData pointer in a global Earlier versions passed the <structname>TriggerData</> pointer in a global
variable CurrentTriggerData. variable <varname>CurrentTriggerData</>.
</para> </para>
</note> </note>
<para> <para>
When a function is called by the trigger manager, it is not passed any When a function is called by the trigger manager, it is not passed any
normal parameters, but it is passed a <quote>context</> pointer pointing to a normal parameters, but it is passed a <quote>context</> pointer pointing to a
TriggerData structure. C functions can check whether they were called <structname>TriggerData</> structure. C functions can check whether they were called
from the trigger manager or not by executing the macro from the trigger manager or not by executing the macro
<literal>CALLED_AS_TRIGGER(fcinfo)</literal>, which expands to <literal>CALLED_AS_TRIGGER(fcinfo)</literal>, which expands to
<programlisting> <programlisting>
((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData)) ((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData))
</programlisting> </programlisting>
If this returns TRUE, then it is safe to cast fcinfo->context to type If this returns true, then it is safe to cast <literal>fcinfo->context</> to type
<literal>TriggerData *</literal> and make use of the pointed-to <literal>TriggerData *</literal> and make use of the pointed-to
TriggerData structure. <structname>TriggerData</> structure.
The function must <emphasis>not</emphasis> alter the TriggerData The function must <emphasis>not</emphasis> alter the <structname>TriggerData</>
structure or any of the data it points to. structure or any of the data it points to.
</para> </para>
...@@ -248,7 +250,7 @@ typedef struct TriggerData ...@@ -248,7 +250,7 @@ typedef struct TriggerData
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>type</term> <term><structfield>type</></term>
<listitem> <listitem>
<para> <para>
Always <literal>T_TriggerData</literal> if this is a trigger event. Always <literal>T_TriggerData</literal> if this is a trigger event.
...@@ -257,7 +259,7 @@ typedef struct TriggerData ...@@ -257,7 +259,7 @@ typedef struct TriggerData
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tg_event</term> <term><structfield>tg_event</></term>
<listitem> <listitem>
<para> <para>
describes the event for which the function is called. You may use the describes the event for which the function is called. You may use the
...@@ -334,21 +336,24 @@ typedef struct TriggerData ...@@ -334,21 +336,24 @@ typedef struct TriggerData
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tg_relation</term> <term><structfield>tg_relation</></term>
<listitem> <listitem>
<para> <para>
is a pointer to structure describing the triggered relation. Look at is a pointer to structure describing the triggered
src/include/utils/rel.h for details about this structure. The most relation. Look at <filename>utils/rel.h</> for details about
interesting things are tg_relation->rd_att (descriptor of the relation this structure. The most interesting things are
tuples) and tg_relation->rd_rel->relname (relation's name. This is not <literal>tg_relation->rd_att</> (descriptor of the relation
char*, but NameData. Use SPI_getrelname(tg_relation) to get char* if tuples) and <literal>tg_relation->rd_rel->relname</>
you need a copy of name). (relation's name. This is not <type>char*</>, but
<type>NameData</>. Use
<literal>SPI_getrelname(tg_relation)</> to get <type>char*</> if you
need a copy of the name).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tg_trigtuple</term> <term><structfield>tg_trigtuple</></term>
<listitem> <listitem>
<para> <para>
is a pointer to the tuple for which the trigger is fired. This is the tuple is a pointer to the tuple for which the trigger is fired. This is the tuple
...@@ -361,10 +366,10 @@ typedef struct TriggerData ...@@ -361,10 +366,10 @@ typedef struct TriggerData
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tg_newtuple</term> <term><structfield>tg_newtuple</></term>
<listitem> <listitem>
<para> <para>
is a pointer to the new version of tuple if UPDATE and NULL if this is is a pointer to the new version of tuple if UPDATE and <symbol>NULL</> if this is
for an INSERT or a DELETE. This is what you are to return to Executor if for an INSERT or a DELETE. This is what you are to return to Executor if
UPDATE and you don't want to replace this tuple with another one or skip UPDATE and you don't want to replace this tuple with another one or skip
the operation. the operation.
...@@ -373,12 +378,12 @@ typedef struct TriggerData ...@@ -373,12 +378,12 @@ typedef struct TriggerData
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>tg_trigger</term> <term><structfield>tg_trigger</></term>
<listitem> <listitem>
<para> <para>
is pointer to structure Trigger defined in src/include/utils/rel.h: is pointer to structure <structname>Trigger</> defined in <filename>utils/rel.h</>:
<programlisting> <programlisting>
typedef struct Trigger typedef struct Trigger
{ {
Oid tgoid; Oid tgoid;
...@@ -394,12 +399,13 @@ typedef struct Trigger ...@@ -394,12 +399,13 @@ typedef struct Trigger
int16 tgattr[FUNC_MAX_ARGS]; int16 tgattr[FUNC_MAX_ARGS];
char **tgargs; char **tgargs;
} Trigger; } Trigger;
</programlisting> </programlisting>
where where <structfield>tgname</> is the trigger's name,
tgname is the trigger's name, tgnargs is number of arguments in tgargs, <structfield>tgnargs</> is number of arguments in
tgargs is an array of pointers to the arguments specified in the CREATE <structfield>tgargs</>, <structfield>tgargs</> is an array of
TRIGGER statement. Other members are for internal use only. pointers to the arguments specified in the CREATE TRIGGER
statement. Other members are for internal use only.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -415,9 +421,9 @@ typedef struct Trigger ...@@ -415,9 +421,9 @@ typedef struct Trigger
changes made by the query itself (via SQL-function, SPI-function, triggers) changes made by the query itself (via SQL-function, SPI-function, triggers)
are invisible to the query scan. For example, in query are invisible to the query scan. For example, in query
<programlisting> <programlisting>
INSERT INTO a SELECT * FROM a; INSERT INTO a SELECT * FROM a;
</programlisting> </programlisting>
tuples inserted are invisible for SELECT scan. In effect, this tuples inserted are invisible for SELECT scan. In effect, this
duplicates the database table within itself (subject to unique index duplicates the database table within itself (subject to unique index
...@@ -438,7 +444,7 @@ execution of Q) or after Q is done. ...@@ -438,7 +444,7 @@ execution of Q) or after Q is done.
<para> <para>
This is true for triggers as well so, though a tuple being inserted This is true for triggers as well so, though a tuple being inserted
(tg_trigtuple) is not visible to queries in a BEFORE trigger, this tuple (<structfield>tg_trigtuple</>) is not visible to queries in a BEFORE trigger, this tuple
(just inserted) is visible to queries in an AFTER trigger, and to queries (just inserted) is visible to queries in an AFTER trigger, and to queries
in BEFORE/AFTER triggers fired after this! in BEFORE/AFTER triggers fired after this!
</para> </para>
...@@ -454,12 +460,12 @@ execution of Q) or after Q is done. ...@@ -454,12 +460,12 @@ execution of Q) or after Q is done.
</para> </para>
<para> <para>
Here is a very simple example of trigger usage. Function trigf reports Here is a very simple example of trigger usage. Function <function>trigf</> reports
the number of tuples in the triggered relation ttest and skips the the number of tuples in the triggered relation <literal>ttest</> and skips the
operation if the query attempts to insert NULL into x (i.e - it acts as a operation if the query attempts to insert a null value into x (i.e - it acts as a
NOT NULL constraint but doesn't abort the transaction). not-null constraint but doesn't abort the transaction).
<programlisting> <programlisting>
#include "executor/spi.h" /* this is what you need to work with SPI */ #include "executor/spi.h" /* this is what you need to work with SPI */
#include "commands/trigger.h" /* -"- and triggers */ #include "commands/trigger.h" /* -"- and triggers */
...@@ -488,9 +494,9 @@ trigf(PG_FUNCTION_ARGS) ...@@ -488,9 +494,9 @@ trigf(PG_FUNCTION_ARGS)
else else
rettuple = trigdata->tg_trigtuple; rettuple = trigdata->tg_trigtuple;
/* check for NULLs ? */ /* check for null values */
if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event) && if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event)
TRIGGER_FIRED_BEFORE(trigdata->tg_event)) && TRIGGER_FIRED_BEFORE(trigdata->tg_event))
checknull = true; checknull = true;
if (TRIGGER_FIRED_BEFORE(trigdata->tg_event)) if (TRIGGER_FIRED_BEFORE(trigdata->tg_event))
...@@ -529,20 +535,20 @@ trigf(PG_FUNCTION_ARGS) ...@@ -529,20 +535,20 @@ trigf(PG_FUNCTION_ARGS)
return PointerGetDatum(rettuple); return PointerGetDatum(rettuple);
} }
</programlisting> </programlisting>
</para> </para>
<para> <para>
Now, compile and create the trigger function: Now, compile and create the trigger function:
<programlisting> <programlisting>
CREATE FUNCTION trigf () RETURNS TRIGGER AS CREATE FUNCTION trigf () RETURNS TRIGGER AS
'...path_to_so' LANGUAGE 'C'; '...path_to_so' LANGUAGE C;
CREATE TABLE ttest (x int4); CREATE TABLE ttest (x int4);
</programlisting> </programlisting>
<programlisting> <programlisting>
vac=> CREATE TRIGGER tbefore BEFORE INSERT OR UPDATE OR DELETE ON ttest vac=> CREATE TRIGGER tbefore BEFORE INSERT OR UPDATE OR DELETE ON ttest
FOR EACH ROW EXECUTE PROCEDURE trigf(); FOR EACH ROW EXECUTE PROCEDURE trigf();
CREATE CREATE
...@@ -556,8 +562,8 @@ INSERT 0 0 ...@@ -556,8 +562,8 @@ INSERT 0 0
-- Insertion skipped and AFTER trigger is not fired -- Insertion skipped and AFTER trigger is not fired
vac=> SELECT * FROM ttest; vac=> SELECT * FROM ttest;
x x
- ---
(0 rows) (0 rows)
vac=> INSERT INTO ttest VALUES (1); vac=> INSERT INTO ttest VALUES (1);
...@@ -567,9 +573,9 @@ INFO: trigf (fired after ): there are 1 tuples in ttest ...@@ -567,9 +573,9 @@ INFO: trigf (fired after ): there are 1 tuples in ttest
remember what we said about visibility. remember what we said about visibility.
INSERT 167793 1 INSERT 167793 1
vac=> SELECT * FROM ttest; vac=> SELECT * FROM ttest;
x x
- ---
1 1
(1 row) (1 row)
vac=> INSERT INTO ttest SELECT x * 2 FROM ttest; vac=> INSERT INTO ttest SELECT x * 2 FROM ttest;
...@@ -579,13 +585,13 @@ INFO: trigf (fired after ): there are 2 tuples in ttest ...@@ -579,13 +585,13 @@ INFO: trigf (fired after ): there are 2 tuples in ttest
remember what we said about visibility. remember what we said about visibility.
INSERT 167794 1 INSERT 167794 1
vac=> SELECT * FROM ttest; vac=> SELECT * FROM ttest;
x x
- ---
1 1
2 2
(2 rows) (2 rows)
vac=> UPDATE ttest SET x = null WHERE x = 2; vac=> UPDATE ttest SET x = NULL WHERE x = 2;
INFO: trigf (fired before): there are 2 tuples in ttest INFO: trigf (fired before): there are 2 tuples in ttest
UPDATE 0 UPDATE 0
vac=> UPDATE ttest SET x = 4 WHERE x = 2; vac=> UPDATE ttest SET x = 4 WHERE x = 2;
...@@ -593,10 +599,10 @@ INFO: trigf (fired before): there are 2 tuples in ttest ...@@ -593,10 +599,10 @@ INFO: trigf (fired before): there are 2 tuples in ttest
INFO: trigf (fired after ): there are 2 tuples in ttest INFO: trigf (fired after ): there are 2 tuples in ttest
UPDATE 1 UPDATE 1
vac=> SELECT * FROM ttest; vac=> SELECT * FROM ttest;
x x
- ---
1 1
4 4
(2 rows) (2 rows)
vac=> DELETE FROM ttest; vac=> DELETE FROM ttest;
...@@ -608,10 +614,10 @@ INFO: trigf (fired after ): there are 0 tuples in ttest ...@@ -608,10 +614,10 @@ INFO: trigf (fired after ): there are 0 tuples in ttest
remember what we said about visibility. remember what we said about visibility.
DELETE 2 DELETE 2
vac=> SELECT * FROM ttest; vac=> SELECT * FROM ttest;
x x
- ---
(0 rows) (0 rows)
</programlisting> </programlisting>
</para> </para>
</sect1> </sect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.16 2002/01/07 02:29:14 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.17 2002/09/21 18:32:54 petere Exp $
--> -->
<chapter id="xaggr"> <chapter id="xaggr">
...@@ -86,7 +86,7 @@ SELECT complex_sum(a) FROM test_complex; ...@@ -86,7 +86,7 @@ SELECT complex_sum(a) FROM test_complex;
<para> <para>
Another bit of default behavior for a <quote>strict</> transition function Another bit of default behavior for a <quote>strict</> transition function
is that the previous state value is retained unchanged whenever a is that the previous state value is retained unchanged whenever a
NULL input value is encountered. Thus, NULLs are ignored. If you NULL input value is encountered. Thus, null values are ignored. If you
need some other behavior for NULL inputs, just define your transition need some other behavior for NULL inputs, just define your transition
function as non-strict, and code it to test for NULL inputs and do function as non-strict, and code it to test for NULL inputs and do
whatever is needed. whatever is needed.
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.60 2002/09/01 16:28:05 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.61 2002/09/21 18:32:54 petere Exp $
--> -->
<chapter id="xfunc"> <chapter id="xfunc">
...@@ -1183,7 +1183,7 @@ CREATE FUNCTION concat_text(text, text) RETURNS text ...@@ -1183,7 +1183,7 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
meaning that meaning that
the system should automatically assume a NULL result if any input the system should automatically assume a NULL result if any input
value is NULL. By doing this, we avoid having to check for NULL inputs value is NULL. By doing this, we avoid having to check for NULL inputs
in the function code. Without this, we'd have to check for NULLs in the function code. Without this, we'd have to check for null values
explicitly, for example by checking for a null pointer for each explicitly, for example by checking for a null pointer for each
pass-by-reference argument. (For pass-by-value arguments, we don't pass-by-reference argument. (For pass-by-value arguments, we don't
even have a way to check!) even have a way to check!)
...@@ -1497,7 +1497,7 @@ LANGUAGE C; ...@@ -1497,7 +1497,7 @@ LANGUAGE C;
either base (scalar) data types, or composite (multi-column) data types. either base (scalar) data types, or composite (multi-column) data types.
The API is split into two main components: support for returning The API is split into two main components: support for returning
composite data types, and support for returning multiple rows composite data types, and support for returning multiple rows
(set returning functions or SRFs). (set returning functions or <acronym>SRF</>s).
</para> </para>
<para> <para>
...@@ -1511,17 +1511,19 @@ LANGUAGE C; ...@@ -1511,17 +1511,19 @@ LANGUAGE C;
</para> </para>
<sect3> <sect3>
<title>Returning Tuples (Composite Types)</title> <title>Returning Rows (Composite Types)</title>
<para> <para>
The Table Function API support for returning composite data types The Table Function API support for returning composite data types
(or tuples) starts with the AttInMetadata struct. This struct holds (or rows) starts with the <structname>AttInMetadata</>
arrays of individual attribute information needed to create a tuple from structure. This structure holds arrays of individual attribute
raw C strings. It also saves a pointer to the TupleDesc. The information information needed to create a row from raw C strings. It also
carried here is derived from the TupleDesc, but it is stored here to saves a pointer to the <structname>TupleDesc</>. The information
avoid redundant CPU cycles on each call to a Table Function. In the carried here is derived from the <structname>TupleDesc</>, but it
case of a function returning a set, the AttInMetadata struct should be is stored here to avoid redundant CPU cycles on each call to a
computed once during the first call and saved for re-use in later calls. table function. In the case of a function returning a set, the
<structname>AttInMetadata</> structure should be computed
once during the first call and saved for re-use in later calls.
<programlisting> <programlisting>
typedef struct AttInMetadata typedef struct AttInMetadata
{ {
...@@ -1538,70 +1540,80 @@ typedef struct AttInMetadata ...@@ -1538,70 +1540,80 @@ typedef struct AttInMetadata
int32 *atttypmods; int32 *atttypmods;
} AttInMetadata; } AttInMetadata;
</programlisting> </programlisting>
To assist you in populating this struct, several functions and a macro </para>
<para>
To assist you in populating this structure, several functions and a macro
are available. Use are available. Use
<programlisting> <programlisting>
TupleDesc RelationNameGetTupleDesc(const char *relname) TupleDesc RelationNameGetTupleDesc(const char *relname)
</programlisting> </programlisting>
to get a TupleDesc based on a specified relation, or to get a <structname>TupleDesc</> based on a specified relation, or
<programlisting> <programlisting>
TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases) TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases)
</programlisting> </programlisting>
to get a TupleDesc based on a type OID. This can be used to to get a <structname>TupleDesc</> based on a type OID. This can
get a TupleDesc for a base (scalar) or composite (relation) type. Then be used to get a <structname>TupleDesc</> for a base (scalar) or
composite (relation) type. Then
<programlisting> <programlisting>
AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc)
</programlisting> </programlisting>
will return a pointer to an AttInMetadata struct, initialized based on will return a pointer to an <structname>AttInMetadata</>,
the given TupleDesc. AttInMetadata can be used in conjunction with initialized based on the given
C strings to produce a properly formed tuple. The metadata is stored here <structname>TupleDesc</>. <structname>AttInMetadata</> can be
to avoid redundant work across multiple calls. used in conjunction with C strings to produce a properly formed
tuple. The metadata is stored here to avoid redundant work across
multiple calls.
</para> </para>
<para> <para>
To return a tuple you must create a tuple slot based on the To return a tuple you must create a tuple slot based on the
TupleDesc. You can use <structname>TupleDesc</>. You can use
<programlisting> <programlisting>
TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc)
</programlisting> </programlisting>
to initialize this tuple slot, or obtain one through other (user provided) to initialize this tuple slot, or obtain one through other (user provided)
means. The tuple slot is needed to create a Datum for return by the means. The tuple slot is needed to create a <type>Datum</> for return by the
function. The same slot can (and should) be re-used on each call. function. The same slot can (and should) be re-used on each call.
</para> </para>
<para> <para>
After constructing an AttInMetadata structure, After constructing an <structname>AttInMetadata</> structure,
<programlisting> <programlisting>
HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values)
</programlisting> </programlisting>
can be used to build a HeapTuple given user data in C string form. can be used to build a <structname>HeapTuple</> given user data
"values" is an array of C strings, one for each attribute of the return in C string form. "values" is an array of C strings, one for
tuple. Each C string should be in the form expected by the input function each attribute of the return tuple. Each C string should be in
of the attribute data type. In order to return a NULL value for the form expected by the input function of the attribute data
one of the attributes, the corresponding pointer in the "values" array type. In order to return a null value for one of the attributes,
should be set to NULL. This function will need to be called again the corresponding pointer in the <parameter>values</> array
for each tuple you return. should be set to <symbol>NULL</>. This function will need to
be called again for each tuple you return.
</para> </para>
<para> <para>
Building a tuple via TupleDescGetAttInMetadata and BuildTupleFromCStrings Building a tuple via <function>TupleDescGetAttInMetadata</> and
is only convenient if your function naturally computes the values to <function>BuildTupleFromCStrings</> is only convenient if your
be returned as text strings. If your code naturally computes the function naturally computes the values to be returned as text
values as a set of Datums, you should instead use the underlying strings. If your code naturally computes the values as a set of
heap_formtuple routine to convert the Datums directly into a tuple. Datums, you should instead use the underlying
You will still need the TupleDesc and a TupleTableSlot, but not <function>heap_formtuple</> routine to convert the
AttInMetadata. <type>Datum</type>s directly into a tuple. You will still need
the <structname>TupleDesc</> and a <structname>TupleTableSlot</>,
but not <structname>AttInMetadata</>.
</para> </para>
<para> <para>
Once you have built a tuple to return from your function, the tuple must Once you have built a tuple to return from your function, the tuple must
be converted into a Datum. Use be converted into a <type>Datum</>. Use
<programlisting> <programlisting>
TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple)
</programlisting> </programlisting>
to get a Datum given a tuple and a slot. This Datum can be returned to get a <type>Datum</> given a tuple and a slot. This
directly if you intend to return just a single row, or it can be used <type>Datum</> can be returned directly if you intend to return
as the current return value in a set-returning function. just a single row, or it can be used as the current return value
in a set-returning function.
</para> </para>
<para> <para>
...@@ -1614,12 +1626,14 @@ TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) ...@@ -1614,12 +1626,14 @@ TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple)
<title>Returning Sets</title> <title>Returning Sets</title>
<para> <para>
A set-returning function (SRF) is normally called once for each item it A set-returning function (<acronym>SRF</>) is normally called
returns. The SRF must therefore save enough state to remember what it once for each item it returns. The <acronym>SRF</> must
was doing and return the next item on each call. The Table Function API therefore save enough state to remember what it was doing and
provides the FuncCallContext struct to help control this process. return the next item on each call. The Table Function API
<literal>fcinfo-&gt;flinfo-&gt;fn_extra</> is used to provides the <structname>FuncCallContext</> structure to help
hold a pointer to FuncCallContext across calls. control this process. <literal>fcinfo-&gt;flinfo-&gt;fn_extra</>
is used to hold a pointer to <structname>FuncCallContext</>
across calls.
<programlisting> <programlisting>
typedef struct typedef struct
{ {
...@@ -1676,12 +1690,11 @@ typedef struct ...@@ -1676,12 +1690,11 @@ typedef struct
* of the SRF. * of the SRF.
*/ */
MemoryContext multi_call_memory_ctx; MemoryContext multi_call_memory_ctx;
} FuncCallContext; } FuncCallContext;
</programlisting> </programlisting>
An SRF uses several functions and macros that automatically manipulate An <acronym>SRF</> uses several functions and macros that
the FuncCallContext struct (and expect to find it via automatically manipulate the <structname>FuncCallContext</>
<literal>fn_extra</>). Use structure (and expect to find it via <literal>fn_extra</>). Use
<programlisting> <programlisting>
SRF_IS_FIRSTCALL() SRF_IS_FIRSTCALL()
</programlisting> </programlisting>
...@@ -1690,13 +1703,14 @@ SRF_IS_FIRSTCALL() ...@@ -1690,13 +1703,14 @@ SRF_IS_FIRSTCALL()
<programlisting> <programlisting>
SRF_FIRSTCALL_INIT() SRF_FIRSTCALL_INIT()
</programlisting> </programlisting>
to initialize the FuncCallContext struct. On every function call, to initialize the <structname>FuncCallContext</>. On every function call,
including the first, use including the first, use
<programlisting> <programlisting>
SRF_PERCALL_SETUP() SRF_PERCALL_SETUP()
</programlisting> </programlisting>
to properly set up for using the FuncCallContext struct and clearing to properly set up for using the <structname>FuncCallContext</>
any previously returned data left over from the previous pass. and clearing any previously returned data left over from the
previous pass.
</para> </para>
<para> <para>
...@@ -1704,24 +1718,25 @@ SRF_PERCALL_SETUP() ...@@ -1704,24 +1718,25 @@ SRF_PERCALL_SETUP()
<programlisting> <programlisting>
SRF_RETURN_NEXT(funcctx, result) SRF_RETURN_NEXT(funcctx, result)
</programlisting> </programlisting>
to return it to the caller. (The <literal>result</> to return it to the caller. (The <literal>result</> must be a
must be a Datum, either a single value or a tuple prepared as described <type>Datum</>, either a single value or a tuple prepared as
earlier.) Finally, when your function is finished returning data, use described earlier.) Finally, when your function is finished
returning data, use
<programlisting> <programlisting>
SRF_RETURN_DONE(funcctx) SRF_RETURN_DONE(funcctx)
</programlisting> </programlisting>
to clean up and end the SRF. to clean up and end the <acronym>SRF</>.
</para> </para>
<para> <para>
The palloc memory context that is current when the SRF is called is The memory context that is current when the <acronym>SRF</> is called is
a transient context that will be cleared between calls. This means a transient context that will be cleared between calls. This means
that you do not need to be careful about pfree'ing everything that you do not need to <function>pfree</> everything
you palloc; it will go away anyway. However, if you want to allocate you <function>palloc</>; it will go away anyway. However, if you want to allocate
any data structures to live across calls, you need to put them somewhere any data structures to live across calls, you need to put them somewhere
else. The memory context referenced by else. The memory context referenced by
<structfield>multi_call_memory_ctx</> is a suitable location for any <structfield>multi_call_memory_ctx</> is a suitable location for any
data that needs to survive until the SRF is finished running. In most data that needs to survive until the <acronym>SRF</> is finished running. In most
cases, this means that you should switch into cases, this means that you should switch into
<structfield>multi_call_memory_ctx</> while doing the first-call setup. <structfield>multi_call_memory_ctx</> while doing the first-call setup.
</para> </para>
...@@ -1776,7 +1791,7 @@ my_Set_Returning_Function(PG_FUNCTION_ARGS) ...@@ -1776,7 +1791,7 @@ my_Set_Returning_Function(PG_FUNCTION_ARGS)
</para> </para>
<para> <para>
A complete example of a simple SRF returning a composite type looks like: A complete example of a simple <acronym>SRF</> returning a composite type looks like:
<programlisting> <programlisting>
PG_FUNCTION_INFO_V1(testpassbyval); PG_FUNCTION_INFO_V1(testpassbyval);
Datum Datum
...@@ -1882,7 +1897,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(int4, int4) RETURNS setof __testpassbyv ...@@ -1882,7 +1897,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(int4, int4) RETURNS setof __testpassbyv
</para> </para>
<para> <para>
See contrib/tablefunc for more examples of Table Functions. See <filename>contrib/tablefunc</> for more examples of table functions.
</para> </para>
</sect3> </sect3>
...@@ -1897,7 +1912,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(int4, int4) RETURNS setof __testpassbyv ...@@ -1897,7 +1912,7 @@ CREATE OR REPLACE FUNCTION testpassbyval(int4, int4) RETURNS setof __testpassbyv
programming language functions. Be warned: this section programming language functions. Be warned: this section
of the manual will not make you a programmer. You must of the manual will not make you a programmer. You must
have a good understanding of <acronym>C</acronym> have a good understanding of <acronym>C</acronym>
(including the use of pointers and the malloc memory manager) (including the use of pointers)
before trying to write <acronym>C</acronym> functions for before trying to write <acronym>C</acronym> functions for
use with <productname>PostgreSQL</productname>. While it may use with <productname>PostgreSQL</productname>. While it may
be possible to load functions written in languages other be possible to load functions written in languages other
...@@ -2183,15 +2198,15 @@ WHERE proname LIKE 'bytea%'; ...@@ -2183,15 +2198,15 @@ WHERE proname LIKE 'bytea%';
<para> <para>
The call handler is called in the same way as any other function: The call handler is called in the same way as any other function:
It receives a pointer to a It receives a pointer to a
<structname>FunctionCallInfoData</structname> struct containing <structname>FunctionCallInfoData</structname> <type>struct</> containing
argument values and information about the called function, and it argument values and information about the called function, and it
is expected to return a <type>Datum</type> result (and possibly is expected to return a <type>Datum</type> result (and possibly
set the <structfield>isnull</structfield> field of the set the <structfield>isnull</structfield> field of the
<structname>FunctionCallInfoData</structname> struct, if it wishes <structname>FunctionCallInfoData</structname> structure, if it wishes
to return an SQL NULL result). The difference between a call to return an SQL NULL result). The difference between a call
handler and an ordinary callee function is that the handler and an ordinary callee function is that the
<structfield>flinfo-&gt;fn_oid</structfield> field of the <structfield>flinfo-&gt;fn_oid</structfield> field of the
<structname>FunctionCallInfoData</structname> struct will contain <structname>FunctionCallInfoData</structname> structure will contain
the OID of the actual function to be called, not of the call the OID of the actual function to be called, not of the call
handler itself. The call handler must use this field to determine handler itself. The call handler must use this field to determine
which function to execute. Also, the passed argument list has which function to execute. Also, the passed argument list has
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.28 2002/07/30 17:34:37 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.29 2002/09/21 18:32:54 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -16,7 +16,7 @@ PostgreSQL documentation ...@@ -16,7 +16,7 @@ PostgreSQL documentation
over a new type, nor associate operators of a new type with secondary over a new type, nor associate operators of a new type with secondary
indexes. indexes.
To do these things, we must define an <firstterm>operator class</> To do these things, we must define an <firstterm>operator class</>
for the new datatype. We will describe operator classes in the for the new data type. We will describe operator classes in the
context of a running example: a new operator context of a running example: a new operator
class for the B-tree access method that stores and class for the B-tree access method that stores and
sorts complex numbers in ascending absolute value order. sorts complex numbers in ascending absolute value order.
...@@ -25,7 +25,7 @@ PostgreSQL documentation ...@@ -25,7 +25,7 @@ PostgreSQL documentation
<note> <note>
<para> <para>
Prior to <productname>PostgreSQL</productname> release 7.3, it was Prior to <productname>PostgreSQL</productname> release 7.3, it was
necesssary to make manual additions to necessary to make manual additions to
<classname>pg_amop</>, <classname>pg_amproc</>, and <classname>pg_amop</>, <classname>pg_amproc</>, and
<classname>pg_opclass</> in order to create a user-defined <classname>pg_opclass</> in order to create a user-defined
operator class. That approach is now deprecated in favor of operator class. That approach is now deprecated in favor of
...@@ -55,7 +55,7 @@ PostgreSQL documentation ...@@ -55,7 +55,7 @@ PostgreSQL documentation
access method needs to be able to use to work with a particular data type. access method needs to be able to use to work with a particular data type.
Operator classes are so called because one thing they specify is the set Operator classes are so called because one thing they specify is the set
of WHERE-clause operators that can be used with an index (ie, can be of WHERE-clause operators that can be used with an index (ie, can be
converted into an indexscan qualification). An operator class may also converted into an index scan qualification). An operator class may also
specify some <firstterm>support procedures</> that are needed by the specify some <firstterm>support procedures</> that are needed by the
internal operations of the index access method, but do not directly internal operations of the index access method, but do not directly
correspond to any WHERE-clause operator that can be used with the index. correspond to any WHERE-clause operator that can be used with the index.
...@@ -63,16 +63,16 @@ PostgreSQL documentation ...@@ -63,16 +63,16 @@ PostgreSQL documentation
<para> <para>
It is possible to define multiple operator classes for the same It is possible to define multiple operator classes for the same
input datatype and index access method. By doing this, multiple input data type and index access method. By doing this, multiple
sets of indexing semantics can be defined for a single datatype. sets of indexing semantics can be defined for a single data type.
For example, a B-tree index requires a sort ordering to be defined For example, a B-tree index requires a sort ordering to be defined
for each datatype it works on. for each data type it works on.
It might be useful for a complex-number datatype It might be useful for a complex-number data type
to have one B-tree operator class that sorts the data by complex to have one B-tree operator class that sorts the data by complex
absolute value, another that sorts by real part, and so on. absolute value, another that sorts by real part, and so on.
Typically one of the operator classes will be deemed most commonly Typically one of the operator classes will be deemed most commonly
useful and will be marked as the default operator class for that useful and will be marked as the default operator class for that
datatype and index access method. data type and index access method.
</para> </para>
<para> <para>
...@@ -101,7 +101,7 @@ PostgreSQL documentation ...@@ -101,7 +101,7 @@ PostgreSQL documentation
comparison it is. Instead, the index access method defines a set of comparison it is. Instead, the index access method defines a set of
<quote>strategies</>, which can be thought of as generalized operators. <quote>strategies</>, which can be thought of as generalized operators.
Each operator class shows which actual operator corresponds to each Each operator class shows which actual operator corresponds to each
strategy for a particular datatype and interpretation of the index strategy for a particular data type and interpretation of the index
semantics. semantics.
</para> </para>
...@@ -240,7 +240,7 @@ PostgreSQL documentation ...@@ -240,7 +240,7 @@ PostgreSQL documentation
<para> <para>
In short, an operator class must specify a set of operators that express In short, an operator class must specify a set of operators that express
each of these semantic ideas for the operator class's datatype. each of these semantic ideas for the operator class's data type.
</para> </para>
</sect1> </sect1>
...@@ -262,7 +262,7 @@ PostgreSQL documentation ...@@ -262,7 +262,7 @@ PostgreSQL documentation
<para> <para>
Just as with operators, the operator class identifies which specific Just as with operators, the operator class identifies which specific
functions should play each of these roles for a given datatype and functions should play each of these roles for a given data type and
semantic interpretation. The index access method specifies the set semantic interpretation. The index access method specifies the set
of functions it needs, and the operator class identifies the correct of functions it needs, and the operator class identifies the correct
functions to use by assigning <quote>support function numbers</> to them. functions to use by assigning <quote>support function numbers</> to them.
...@@ -572,7 +572,7 @@ CREATE OPERATOR CLASS complex_abs_ops ...@@ -572,7 +572,7 @@ CREATE OPERATOR CLASS complex_abs_ops
<programlisting> <programlisting>
OPERATOR 1 &lt; (complex, complex) , OPERATOR 1 &lt; (complex, complex) ,
</programlisting> </programlisting>
but there is no need to do so when the operators take the same datatype but there is no need to do so when the operators take the same data type
we are defining the operator class for. we are defining the operator class for.
</para> </para>
...@@ -631,9 +631,9 @@ CREATE OPERATOR CLASS polygon_ops ...@@ -631,9 +631,9 @@ CREATE OPERATOR CLASS polygon_ops
</programlisting> </programlisting>
At present, only the GiST access method supports a At present, only the GiST access method supports a
<literal>STORAGE</> type that's different from the column datatype. <literal>STORAGE</> type that's different from the column data type.
The GiST <literal>compress</> and <literal>decompress</> support The GiST <literal>compress</> and <literal>decompress</> support
routines must deal with datatype conversion when <literal>STORAGE</> routines must deal with data-type conversion when <literal>STORAGE</>
is used. is used.
</para> </para>
</sect1> </sect1>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/xoper.sgml,v 1.19 2002/05/11 02:09:41 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/xoper.sgml,v 1.20 2002/09/21 18:32:54 petere Exp $
--> -->
<Chapter Id="xoper"> <Chapter Id="xoper">
...@@ -200,9 +200,9 @@ SELECT (a + b) AS c FROM test_complex; ...@@ -200,9 +200,9 @@ SELECT (a + b) AS c FROM test_complex;
<para> <para>
Providing a negator is very helpful to the query optimizer since Providing a negator is very helpful to the query optimizer since
it allows expressions like NOT (x = y) to be simplified into it allows expressions like <literal>NOT (x = y)</> to be simplified into
x &lt;&gt; y. This comes up more often than you might think, because x &lt;&gt; y. This comes up more often than you might think, because
NOTs can be inserted as a consequence of other rearrangements. <literal>NOT</> operations can be inserted as a consequence of other rearrangements.
</para> </para>
<para> <para>
...@@ -378,14 +378,14 @@ table1.column1 OP table2.column2 ...@@ -378,14 +378,14 @@ table1.column1 OP table2.column2
</sect2> </sect2>
<sect2> <sect2>
<title>MERGES (SORT1, SORT2, LTCMP, GTCMP)</title> <title><literal>MERGES</> (<literal>SORT1</>, <literal>SORT2</>, <literal>LTCMP</>, <literal>GTCMP</>)</title>
<para> <para>
The <literal>MERGES</literal> clause, if present, tells the system that The <literal>MERGES</literal> clause, if present, tells the system that
it is permissible to use the merge join method for a join based on this it is permissible to use the merge join method for a join based on this
operator. <literal>MERGES</> only makes sense for binary operators that operator. <literal>MERGES</> only makes sense for binary operators that
return <literal>boolean</>, and in practice the operator must represent return <literal>boolean</>, and in practice the operator must represent
equality for some datatype or pair of datatypes. equality for some data type or pair of data types.
</para> </para>
<para> <para>
...@@ -400,19 +400,19 @@ table1.column1 OP table2.column2 ...@@ -400,19 +400,19 @@ table1.column1 OP table2.column2
it is possible to merge-join two it is possible to merge-join two
distinct data types so long as they are logically compatible. For distinct data types so long as they are logically compatible. For
example, the <type>int2</type>-versus-<type>int4</type> equality operator example, the <type>int2</type>-versus-<type>int4</type> equality operator
is mergejoinable. is merge-joinable.
We only need sorting operators that will bring both data types into a We only need sorting operators that will bring both data types into a
logically compatible sequence. logically compatible sequence.
</para> </para>
<para> <para>
Execution of a merge join requires that the system be able to identify Execution of a merge join requires that the system be able to identify
four operators related to the mergejoin equality operator: less-than four operators related to the merge-join equality operator: less-than
comparison for the left input datatype, less-than comparison for the comparison for the left input data type, less-than comparison for the
right input datatype, less-than comparison between the two datatypes, and right input data type, less-than comparison between the two data types, and
greater-than comparison between the two datatypes. (These are actually greater-than comparison between the two data types. (These are actually
four distinct operators if the mergejoinable operator has two different four distinct operators if the merge-joinable operator has two different
input datatypes; but when the input types are the same the three input data types; but when the input types are the same the three
less-than operators are all the same operator.) less-than operators are all the same operator.)
It is possible to It is possible to
specify these operators individually by name, as the <literal>SORT1</>, specify these operators individually by name, as the <literal>SORT1</>,
...@@ -426,8 +426,8 @@ table1.column1 OP table2.column2 ...@@ -426,8 +426,8 @@ table1.column1 OP table2.column2
</para> </para>
<para> <para>
The input datatypes of the four comparison operators can be deduced The input data types of the four comparison operators can be deduced
from the input types of the mergejoinable operator, so just as with from the input types of the merge-joinable operator, so just as with
<literal>COMMUTATOR</>, only the operator names need be given in these <literal>COMMUTATOR</>, only the operator names need be given in these
clauses. Unless you are using peculiar choices of operator names, clauses. Unless you are using peculiar choices of operator names,
it's sufficient to write <literal>MERGES</> and let the system fill in it's sufficient to write <literal>MERGES</> and let the system fill in
...@@ -440,14 +440,14 @@ table1.column1 OP table2.column2 ...@@ -440,14 +440,14 @@ table1.column1 OP table2.column2
<para> <para>
There are additional restrictions on operators that you mark There are additional restrictions on operators that you mark
mergejoinable. These restrictions are not currently checked by merge-joinable. These restrictions are not currently checked by
<command>CREATE OPERATOR</command>, but errors may occur when <command>CREATE OPERATOR</command>, but errors may occur when
the operator is used if any are not true: the operator is used if any are not true:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
A mergejoinable equality operator must have a mergejoinable A merge-joinable equality operator must have a merge-joinable
commutator (itself if the two data types are the same, or a related commutator (itself if the two data types are the same, or a related
equality operator if they are different). equality operator if they are different).
</para> </para>
...@@ -455,10 +455,10 @@ table1.column1 OP table2.column2 ...@@ -455,10 +455,10 @@ table1.column1 OP table2.column2
<listitem> <listitem>
<para> <para>
If there is a mergejoinable operator relating any two data types If there is a merge-joinable operator relating any two data types
A and B, and another mergejoinable operator relating B to any A and B, and another merge-joinable operator relating B to any
third data type C, then A and C must also have a mergejoinable third data type C, then A and C must also have a merge-joinable
operator; in other words, having a mergejoinable operator must operator; in other words, having a merge-joinable operator must
be transitive. be transitive.
</para> </para>
</listitem> </listitem>
...@@ -476,7 +476,7 @@ table1.column1 OP table2.column2 ...@@ -476,7 +476,7 @@ table1.column1 OP table2.column2
<para> <para>
In <ProductName>PostgreSQL</ProductName> versions before 7.3, In <ProductName>PostgreSQL</ProductName> versions before 7.3,
the <literal>MERGES</> shorthand was not available: to make a the <literal>MERGES</> shorthand was not available: to make a
mergejoinable operator one had to write both <literal>SORT1</> and merge-joinable operator one had to write both <literal>SORT1</> and
<literal>SORT2</> explicitly. Also, the <literal>LTCMP</> and <literal>SORT2</> explicitly. Also, the <literal>LTCMP</> and
<literal>GTCMP</> <literal>GTCMP</>
options did not exist; the names of those operators were hardwired as options did not exist; the names of those operators were hardwired as
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.18 2002/08/22 00:01:40 tgl Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/xplang.sgml,v 1.19 2002/09/21 18:32:54 petere Exp $
--> -->
<chapter id="xplang"> <chapter id="xplang">
...@@ -122,10 +122,10 @@ CREATE <optional>TRUSTED</optional> <optional>PROCEDURAL</optional> LANGUAGE <re ...@@ -122,10 +122,10 @@ CREATE <optional>TRUSTED</optional> <optional>PROCEDURAL</optional> LANGUAGE <re
In a default <productname>PostgreSQL</productname> installation, In a default <productname>PostgreSQL</productname> installation,
the handler for the <application>PL/pgSQL</application> language the handler for the <application>PL/pgSQL</application> language
is built and installed into the <quote>library</quote> is built and installed into the <quote>library</quote>
directory. If Tcl/Tk support is configured in, the handlers for directory. If <application>Tcl/Tk</> support is configured in, the handlers for
PL/Tcl and PL/TclU are also built and installed in the same <application>PL/Tcl</> and <application>PL/TclU</> are also built and installed in the same
location. Likewise, the PL/Perl and PL/PerlU handlers are built location. Likewise, the <application>PL/Perl</> and <application>PL/PerlU</> handlers are built
and installed if Perl support is configured, and PL/Python is and installed if Perl support is configured, and <application>PL/Python</> is
installed if Python support is configured. The installed if Python support is configured. The
<filename>createlang</filename> script automates <xref <filename>createlang</filename> script automates <xref
linkend="xplang-install-cr1"> and <xref linkend="xplang-install-cr1"> and <xref
......
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