Commit a4ac2f45 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Fix markup for docbook2man man page generation.

No big deal; fixed lots of other markup at the same time.
Bigest change: make sure there is no whitespace
 in front of <term> contents.
This will probably help the other output types too.
parent 192a66e3
<REFENTRY ID="SQL-ABORT">
<REFMETA>
<REFENTRYTITLE>
ABORT
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
ABORT
</REFNAME>
<REFPURPOSE>
Aborts the current transaction
</REFPURPOSE>
</REFNAMEDIV>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-27</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
ABORT
</SYNOPSIS>
<refentry id="SQL-ABORT">
<refmeta>
<refentrytitle>
ABORT
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
ABORT
</refname>
<refpurpose>
Aborts the current transaction
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-27</date>
</refsynopsisdivinfo>
<synopsis>
ABORT [ TRANSACTION | WORK ]
</synopsis>
<REFSECT2 ID="R2-SQL-ABORT-1">
<REFSECT2INFO>
<DATE>1998-09-27</DATE>
</REFSECT2INFO>
<TITLE>
Inputs
</TITLE>
<PARA>
None.
</para>
<refsect2 id="R2-SQL-ABORT-1">
<refsect2info>
<date>1998-09-27</date>
</refsect2info>
<title>
Inputs
</title>
</REFSECT2>
<para>
None.
</para>
</refsect2>
<REFSECT2 ID="R2-SQL-ABORT-2">
<REFSECT2INFO>
<DATE>1998-09-27</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<refsect2 id="R2-SQL-ABORT-2">
<refsect2info>
<date>1998-09-27</date>
</refsect2info>
<title>
Outputs
</title>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
ABORT
</TERM>
<LISTITEM>
<PARA>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
ABORT
</computeroutput></term>
<listitem>
<para>
Message returned if successful.
</para>
</listitem>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE: UserAbortTransactionBlock and not in in-progress state
ABORT
</TERM>
<LISTITEM>
<PARA>
</computeroutput></term>
<listitem>
<para>
If there is not any transaction currently in progress.
</para>
</listitem>
</VARLISTENTRY>
</VARIABLELIST>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-ABORT-1">
<REFSECT1INFO>
<DATE>1998-09-27</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
<refsect1 id="R1-SQL-ABORT-1">
<refsect1info>
<date>1998-09-27</date>
</refsect1info>
<title>
Description
</title>
<para>
<command>ABORT</command> rolls back the current transaction and causes
all the updates made by the transaction to be discarded.
This command is identical
in behavior to the <acronym>SQL92</acronym> command <command>ROLLBACK</command>,
and is present only for historical reasons.
</para>
<REFSECT2 ID="R2-SQL-ABORT-3">
<REFSECT2INFO>
<DATE>1998-09-27</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<para>
Use the <command>COMMIT</command> statement to successfully
This command is identical
in behavior to the <acronym>SQL92</acronym> command <command>ROLLBACK</command>,
and is present only for historical reasons.
</para>
<refsect2 id="R2-SQL-ABORT-3">
<refsect2info>
<date>1998-09-27</date>
</refsect2info>
<title>
Notes
</title>
<para>
Use <command>COMMIT</command> to successfully
terminate a transaction.
</para>
</refsect2>
</REFSECT1>
</para>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-ABORT-2">
<TITLE>
Usage
</TITLE>
<PARA>
<ProgramListing>
--To abort all changes
--
<refsect1 id="R1-SQL-ABORT-2">
<title>
Usage
</title>
<para>
To abort all changes:
<programlisting>
ABORT WORK;
</ProgramListing>
</para>
</programlisting>
</para>
</refsect1>
</REFSECT1>
<refsect1 id="R1-SQL-ABORT-3">
<title>
Compatibility
</title>
<REFSECT1 ID="R1-SQL-ABORT-3">
<TITLE>
Compatibility
</TITLE>
<refsect2 id="R2-SQL-ABORT-4">
<refsect2info>
<date>1998-09-27</date>
</refsect2info>
<title>
SQL92
</title>
<para>
This command is a <productname>Postgres</productname> extension present
for historical reasons. <command>ROLLBACK</command> is the <acronym>SQL92</acronym>
equivalent command.
</para>
</refsect2>
</refsect1>
<REFSECT2 ID="R2-SQL-ABORT-4">
<REFSECT2INFO>
<DATE>1998-09-27</DATE>
</REFSECT2INFO>
<TITLE>
SQL92
</TITLE>
<para>
This command is a <productname>Postgres</productname> extension present
for historical reasons. <command>ROLLBACK</command> is the <acronym>SQL92</acronym>
equivalent command.
</PARA>
</refsect2>
</refsect1>
</refentry>
</REFENTRY>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
This diff is collapsed.
<refentry id="SQL-ALTERUSER">
<refentry id="SQL-ALTERUSER">
<refmeta>
<refentrytitle>
ALTER USER
......@@ -18,10 +18,8 @@
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
ALTER USER <replaceable class="PARAMETER">username</replaceable>
[ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
[ CREATEDB | NOCREATEDB ]
[ CREATEUSER | NOCREATEUSER ]
ALTER USER <replaceable class="PARAMETER">username</replaceable> [ WITH PASSWORD <replaceable class="PARAMETER">password</replaceable> ]
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
[ IN GROUP <replaceable class="PARAMETER">groupname</replaceable> [, ...] ]
[ VALID UNTIL '<replaceable class="PARAMETER">abstime</replaceable>' ]
</synopsis>
......@@ -33,15 +31,16 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
<title>
Inputs
</title>
<para>
Refer to <command>CREATE USER</command> for a detailed description of each
clause.
</para>
<para>
<variablelist>
<varlistentry>
<term>
<replaceable class="PARAMETER"> username </replaceable>
</term>
<term><replaceable class="PARAMETER"> username </replaceable></term>
<listitem>
<para>
The Postgres account name of the user whose details are to be altered.
......@@ -50,9 +49,7 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</varlistentry>
<varlistentry>
<term>
<replaceable class="PARAMETER"> password </replaceable>
</term>
<term><replaceable class="PARAMETER"> password </replaceable></term>
<listitem>
<para>
The new password to be used for this account.
......@@ -61,9 +58,7 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</varlistentry>
<varlistentry>
<term>
<replaceable class="PARAMETER"> groupname </replaceable>
</term>
<term><replaceable class="PARAMETER"> groupname </replaceable></term>
<listitem>
<para>
The name of an access group into which this account is to be put.
......@@ -72,9 +67,7 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</varlistentry>
<varlistentry>
<term>
<replaceable class="PARAMETER"> abstime </replaceable>
</term>
<term><replaceable class="PARAMETER"> abstime </replaceable></term>
<listitem>
<para>
The date (and, optionally, the time)
......@@ -83,6 +76,7 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<refsect2 id="R2-SQL-ALTERUSER-2">
......@@ -95,9 +89,9 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
<para>
<variablelist>
<varlistentry>
<term>
<returnvalue>ALTER USER</returnvalue>
</term>
<term><computeroutput>
ALTER USER
</computeroutput></term>
<listitem>
<para>
Message returned if the alteration was successful.
......@@ -106,13 +100,13 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
</varlistentry>
<varlistentry>
<term>
<returnvalue>ERROR: alterUser: user "username" does not exist</returnvalue>
</term>
<term><computeroutput>
ERROR: alterUser: user "username" does not exist
</computeroutput></term>
<listitem>
<para>
Error message returned if the user specified doesn't
exist.
Error message returned if the specified user is not known to
the database.
</para>
</listitem>
</varlistentry>
......@@ -136,8 +130,9 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
statement. Also, it is only possible for the
<productname>Postgres</productname>
user or any user with read and modify permissions on
"pg_shadow" to alter user passwords.
<literal>pg_shadow</literal> to alter user passwords.
</para>
<para>
If any of the clauses of the alter user statement are
omitted, the corresponding value in the "pg_shadow" table
......@@ -152,14 +147,13 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
Notes
</title>
<para>
<command>ALTER USER</command> statement
<command>ALTER USER</command>
is a <productname>Postgres</productname>
language extension.
</para>
<para>
Refer to <command>CREATE/DROP USER</command>
to create or remove a user
account.
to create or remove a user account.
</para>
<para>
In the current release (v6.5), the IN GROUP clause is parsed
......@@ -174,37 +168,37 @@ ALTER USER <replaceable class="PARAMETER">username</replaceable>
Usage
</title>
<para>
Change a user password
</para>
Change a user password:
<programlisting>
ALTER USER davide WITH PASSWORD hu8jmn3;
</programlisting>
<para>
Change a user's valid until date
</para>
<programlisting>
ALTER USER manuel VALID UNTIL 'Jan 31 2030';
</programlisting>
<para>
Change a user's valid until date, specifying that his
authorisation should expire at midday on 4th May 1998 using
the time zone which is one hour ahead of UTC
</para>
authorisation should expire at midday on 4th May 1998 using
the time zone which is one hour ahead of UTC
<programlisting>
ALTER USER chris VALID UNTIL 'May 4 12:00:00 1998 +1';
</programlisting>
<para>
Give a user the ability to create other users and new databases.
</para>
<programlisting>
ALTER USER miriam CREATEUSER CREATEDB;
</programlisting>
<para>
Place a user in two groups
</para>
<programlisting>
ALTER USER miriam IN GROUP sales, payroll;
</programlisting>
</para>
</refsect1>
<refsect1 id="R1-SQL-ALTERUSER-3">
......@@ -229,7 +223,7 @@ ALTER USER miriam IN GROUP sales, payroll;
</para>
</refsect2>
</refsect1>
</refentry>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
......
......@@ -30,7 +30,7 @@ BEGIN [ WORK | TRANSACTION ]
Inputs
</title>
<para>
None
None.
</para>
</refsect2>
......@@ -45,9 +45,9 @@ BEGIN [ WORK | TRANSACTION ]
<para>
<variablelist>
<varlistentry>
<term>
<returnvalue>BEGIN</returnvalue>
</term>
<term><computeroutput>
BEGIN
</computeroutput></term>
<listitem>
<para>
This signifies that a new transaction has been started.
......@@ -55,9 +55,9 @@ BEGIN [ WORK | TRANSACTION ]
</listitem>
</varlistentry>
<varlistentry>
<term>
<returnvalue>NOTICE: BeginTransactionBlock and not in default state</returnvalue>
</term>
<term><computeroutput>
NOTICE: BeginTransactionBlock and not in default state
</computeroutput></term>
<listitem>
<para>
This indicates that a transaction was already in progress.
......
<REFENTRY ID="SQL-CLOSE">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-CLOSE">
<refmeta>
<refentrytitle>
CLOSE
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
CLOSE
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Close a cursor
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-08</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
CLOSE <REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
</SYNOPSIS>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
CLOSE <replaceable class="PARAMETER">cursor</replaceable>
</synopsis>
<REFSECT2 ID="R2-SQL-CLOSE-1">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLOSE-1">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">cursor</replaceable></term>
<listitem>
<para>
The name of an open cursor to close.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
</refsect2>
<REFSECT2 ID="R2-SQL-CLOSE-2">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLOSE-2">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<ReturnValue>CLOSE</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
CLOSE
</computeroutput></term>
<listitem>
<para>
Message returned if the cursor is successfully closed.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<ReturnValue>NOTICE PerformPortalClose: portal "<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE>" not found</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
NOTICE PerformPortalClose: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found
</computeroutput></term>
<listitem>
<para>
This warning is given if
<REPLACEABLE CLASS="PARAMETER">cursor</REPLACEABLE> is not
<replaceable class="PARAMETER">cursor</replaceable> is not
declared or has already been closed.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-CLOSE-1">
<REFSECT1INFO>
<DATE>1998-09-08</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-CLOSE-1">
<refsect1info>
<date>1998-09-08</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>CLOSE</command> frees the resources associated with an open cursor.
After the cursor is closed, no subsequent operations
are allowed on it. A cursor should be closed when it is
no longer needed.
</PARA>
<PARA>
</para>
<para>
An implicit close is executed for every open cursor when a
transaction is terminated by <command>COMMIT</command>
or <command>ROLLBACK</command>.
</PARA>
</para>
<REFSECT2 ID="R2-SQL-CLOSE-3">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLOSE-3">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
<productname>Postgres</productname> does not have
</title>
<para>
<productname>Postgres</productname> does not have
an explicit <command>OPEN</command> cursor statement;
a cursor is considered open when it is declared.
Use the <command>DECLARE</command> statement to declare a cursor.
</PARA>
</REFSECT2>
</para>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-CLOSE-2">
<TITLE>
<refsect1 id="R1-SQL-CLOSE-2">
<title>
Usage
</TITLE>
<PARA>
</title>
<para>
Close the cursor liahona:
</PARA>
<ProgramListing>
</para>
<programlisting>
CLOSE liahona;
</ProgramListing>
</REFSECT1>
</programlisting>
</refsect1>
<REFSECT1 ID="R1-SQL-CLOSE-3">
<TITLE>
<refsect1 id="R1-SQL-CLOSE-3">
<title>
Compatibility
</TITLE>
<PARA>
</PARA>
</title>
<para>
</para>
<REFSECT2 ID="R2-SQL-CLOSE-4">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLOSE-4">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
<command>CLOSE</command> is fully compatible with SQL92.
</PARA>
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
......
<REFENTRY ID="SQL-CLUSTER">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-CLUSTER">
<refmeta>
<refentrytitle>
CLUSTER
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
CLUSTER
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Gives storage clustering advice to the backend
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-08</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
CLUSTER <REPLACEABLE CLASS="PARAMETER">indexname</REPLACEABLE> ON <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
</SYNOPSIS>
<REFSECT2 ID="R2-SQL-CLUSTER-1">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-08</date>
</refsynopsisdivinfo>
<synopsis>
CLUSTER <replaceable class="PARAMETER">indexname</replaceable> ON <replaceable class="PARAMETER">table</replaceable>
</synopsis>
<refsect2 id="R2-SQL-CLUSTER-1">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER">indexname</REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
</para>
<variablelist>
<varlistentry>
<term><replaceable class="PARAMETER">indexname</replaceable></term>
<listitem>
<para>
The name of an index.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
The name of a table.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</REFSECT2>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<REFSECT2 ID="R2-SQL-CLUSTER-2">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLUSTER-2">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<returnvalue>CLUSTER</returnvalue>
</TERM>
<LISTITEM>
<PARA>
The clustering was done successfully.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<returnvalue>ERROR: relation &lt;<REPLACEABLE CLASS="PARAMETER">tablerelation_number</REPLACEABLE>&gt; inherits "invoice"</returnvalue>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
CLUSTER
</computeroutput></term>
<listitem>
<para>
The clustering was done successfully.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: relation &lt;<replaceable class="PARAMETER">tablerelation_number</replaceable>&gt; inherits "invoice"
</computeroutput></term>
<listitem>
<para>
<comment>
This is not documented anywhere. It seems not to be possible to
cluster a table that is inherited.
</comment>
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<returnvalue>ERROR: Relation x does not exist!</returnvalue>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: Relation x does not exist!
</computeroutput></term>
<listitem>
<para>
<comment>
The relation complained of was not shown in the error message,
which contained a random string instead of the relation name.
</comment>
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-CLUSTER-1">
<REFSECT1INFO>
<DATE>1998-09-08</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-CLUSTER-1">
<refsect1info>
<date>1998-09-08</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>CLUSTER</command> instructs <productname>Postgres</productname>
to cluster the class specified
to cluster the class specified
by <replaceable class="parameter">classname</replaceable> approximately
based on the index specified by
<replaceable class="parameter">indexname</replaceable>. The index must
already have been defined on
<replaceable class="parameter">classname</replaceable>.
</PARA>
<replaceable class="parameter">classname</replaceable>.
</para>
<para>
When a class is clustered, it is physically reordered
based on the index information. The clustering is static.
......@@ -132,13 +126,13 @@ to cluster the class specified
recluster manually by issuing the command again.
</para>
<REFSECT2 ID="R2-SQL-CLUSTER-3">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLUSTER-3">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
Notes
</TITLE>
</title>
<para>
The table is actually copied to a temporary table in index
......@@ -179,13 +173,13 @@ to cluster the class specified
<para>
Another way to cluster data is to use
<programlisting>
<programlisting>
SELECT ... INTO TABLE <replaceable class="parameter">temp</replaceable> FROM ... ORDER BY ...
</programlisting>
</programlisting>
This uses the <productname>Postgres</productname> sorting code in
ORDER BY to match the index, and is much faster for
unordered data. You then drop the old table, use
<command>ALTER TABLE/RENAME</command>
<command>ALTER TABLE/RENAME</command>
to rename <replaceable class="parameter">temp</replaceable> to the old name, and
recreate any indexes. The only problem is that <acronym>OID</acronym>s
will not be preserved. From then on, <command>CLUSTER</command> should be
......@@ -195,44 +189,43 @@ SELECT ... INTO TABLE <replaceable class="parameter">temp</replaceable> FROM ...
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-CLUSTER-2">
<TITLE>
<refsect1 id="R1-SQL-CLUSTER-2">
<title>
Usage
</TITLE>
<PARA>
</title>
<para>
Cluster the employees relation on the basis of its salary attribute
</PARA>
<ProgramListing>
CLUSTER emp_ind ON emp
</ProgramListing>
</REFSECT1>
</para>
<programlisting>
CLUSTER emp_ind ON emp;
</programlisting>
</refsect1>
<REFSECT1 ID="R1-SQL-CLUSTER-3">
<TITLE>
<refsect1 id="R1-SQL-CLUSTER-3">
<title>
Compatibility
</TITLE>
<PARA>
</PARA>
</title>
<para>
</para>
<REFSECT2 ID="R2-SQL-CLUSTER-4">
<REFSECT2INFO>
<DATE>1998-09-08</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CLUSTER-4">
<refsect2info>
<date>1998-09-08</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
There is no <command>CLUSTER</command> statement in SQL92.
</PARA>
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
......@@ -30,7 +30,7 @@ COMMIT [ WORK | TRANSACTION ]
Inputs
</title>
<para>
None
None.
</para>
</refsect2>
......@@ -45,9 +45,9 @@ COMMIT [ WORK | TRANSACTION ]
<variablelist>
<varlistentry>
<term>
<returnvalue>END</returnvalue>
</term>
<term><computeroutput>
END
</computeroutput></term>
<listitem>
<para>
Message returned if the transaction is successfully committed.
......@@ -55,9 +55,9 @@ COMMIT [ WORK | TRANSACTION ]
</listitem>
</varlistentry>
<varlistentry>
<term>
<returnvalue>NOTICE EndTransactionBlock and not inprogress/abort state</returnvalue>
</term>
<term><computeroutput>
NOTICE EndTransactionBlock and not inprogress/abort state
</computeroutput></term>
<listitem>
<para>
If there is no transaction in progress.
......
This diff is collapsed.
This diff is collapsed.
<REFENTRY ID="SQL-CREATEDATABASE">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-CREATEDATABASE">
<refmeta>
<refentrytitle>
CREATE DATABASE
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
CREATE DATABASE
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Creates a new database
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-04-15</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
CREATE DATABASE <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> [ WITH LOCATION = '<replaceable class="parameter">dbpath</replaceable>' ]
</SYNOPSIS>
<REFSECT2 ID="R2-SQL-CREATEDATABASE-1">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-04-15</date>
</refsynopsisdivinfo>
<synopsis>
CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ WITH LOCATION = '<replaceable class="parameter">dbpath</replaceable>' ]
</synopsis>
<refsect2 id="R2-SQL-CREATEDATABASE-1">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">name</replaceable>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
The name of a database to create.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">dbpath</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">dbpath</replaceable></term>
<listitem>
<para>
An alternate location can be specified as either an
environment variable known to the backend server
(e.g. '<envar>PGDATA2</envar>') or as an absolute path name
(e.g. '<filename>/usr/local/pgsql/data</filename>').
In either case, the location must be pre-configured
by <command>initlocation</command>.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</para>
</REFSECT2>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
<REFSECT2 ID="R2-SQL-CREATEDATABASE-2">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEDATABASE-2">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<ReturnValue>CREATEDB</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term><computeroutput>
CREATEDB
</computeroutput></term>
<listitem>
<para>
Message returned if the command completes successfully.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<ReturnValue>WARN: createdb: database "<replaceable class="parameter">name</replaceable>" already exists.</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
WARN: createdb: database "<replaceable class="parameter">name</replaceable>" already exists.
</computeroutput></term>
<listitem>
<para>
This occurs if <replaceable class="parameter">database</replaceable> specified already exists.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<ReturnValue>ERROR: Unable to create database directory <replaceable class="parameter">directory</replaceable>
</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: Unable to create database directory <replaceable class="parameter">directory</replaceable>
</computeroutput></term>
<listitem>
<para>
There was a problem with creating the required directory; this operation will
need permissions for the <literal>postgres</literal> user on the specified location.
</para>
</listitem>
</varlistentry>
</VARIABLELIST>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
<REFSECT1 ID="R1-SQL-CREATEDATABASE-1">
<REFSECT1INFO>
<DATE>1998-04-15</DATE>
</REFSECT1INFO>
<TITLE>
</refsect2>
</refsynopsisdiv>
<refsect1 id="R1-SQL-CREATEDATABASE-1">
<refsect1info>
<date>1998-04-15</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>CREATE DATABASE</command> creates a new Postgres database.
The creator becomes the administrator of the new database.
</PARA>
</para>
<REFSECT2 ID="R2-SQL-CREATEDATABASE-3">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEDATABASE-3">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
</title>
<para>
<command>CREATE DATABASE</command> is a <productname>Postgres</productname>
language extension.
</PARA>
</para>
<para>
Use <command>DROP DATABASE</command> to remove a database.
</para>
</REFSECT2>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-CREATEDATABASE-2">
<TITLE>
<refsect1 id="R1-SQL-CREATEDATABASE-2">
<title>
Usage
</TITLE>
<PARA>
</title>
<para>
To create a new database:
</PARA>
<ProgramListing>
<prompt>olly=></prompt> <userinput>create database lusiadas;</userinput>
</ProgramListing>
<PARA>
<programlisting>
<prompt>olly=></prompt> <userinput>create database lusiadas;</userinput>
</programlisting>
</para>
<para>
To create a new database in an alternate area <filename>~/private_db</filename>:
</PARA>
<ProgramListing>
<prompt>$</prompt> <userinput>mkdir private_db</userinput>
<prompt>$</prompt> <userinput>initlocation ~/private_db</userinput>
<computeroutput>Creating Postgres database system directory /home/olly/private_db/base</computeroutput>
<programlisting>
<prompt>$</prompt> <userinput>mkdir private_db</userinput>
<prompt>$</prompt> <userinput>initlocation ~/private_db</userinput>
<computeroutput>Creating Postgres database system directory /home/olly/private_db/base</computeroutput>
<prompt>$</prompt> <userinput>psql olly</userinput>
<computeroutput>Welcome to the POSTGRESQL interactive sql monitor:
......@@ -164,21 +162,22 @@ CREATE DATABASE <REPLACEABLE CLASS="PARAMETER">name</REPLACEABLE> [ WITH LOCATIO
<prompt>olly=></prompt></computeroutput> <userinput>create database elsewhere with location = '/home/olly/private_db';</userinput>
<computeroutput>CREATEDB</computeroutput>
</ProgramListing>
</REFSECT1>
</programlisting>
</para>
</refsect1>
<REFSECT1 ID="R1-SQL-CREATEDATABASE-3">
<TITLE>
<refsect1 id="R1-SQL-CREATEDATABASE-3">
<title>
Bugs
</TITLE>
<PARA>
</title>
<para>
There are security and data integrity issues
involved with using alternate database locations
specified with absolute path names, and by default
only an environment variable known to the backend may be
specified for an alternate location.
only an environment variable known to the backend may be
specified for an alternate location.
See the Administrator's Guide for more information.
</PARA>
</para>
</refsect1>
<!--
......@@ -192,33 +191,32 @@ Hmm. This isn't an issue since the upgrade would do a dump/reload from the main
Not sure if the dump/reload would guarantee that the alternate data area gets refreshed though...
-->
<REFSECT1 ID="R1-SQL-CREATEDATABASE-4">
<TITLE>
<refsect1 id="R1-SQL-CREATEDATABASE-4">
<title>
Compatibility
</TITLE>
</title>
<REFSECT2 ID="R2-SQL-CREATEDATABASE-4">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEDATABASE-4">
<refsect2info>
<date>1998-04-15</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
There is no <command>CREATE DATABASE</command> statement in SQL92.
</PARA>
</para>
<para>
The equivalent command in standard SQL is <command>CREATE SCHEMA</command>.
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
......@@ -32,11 +32,10 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
Inputs
</title>
<para>
<variablelist>
<varlistentry>
<term>
<replaceable class="parameter">name</replaceable>
</term>
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
The name of a function to create.
......@@ -44,9 +43,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">ftype</replaceable>
</term>
<term><replaceable class="parameter">ftype</replaceable></term>
<listitem>
<para>
The data type of function arguments.
......@@ -54,9 +51,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">rtype</replaceable>
</term>
<term><replaceable class="parameter">rtype</replaceable></term>
<listitem>
<para>
The return data type.
......@@ -64,9 +59,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">definition</replaceable>
</term>
<term><replaceable class="parameter">definition</replaceable></term>
<listitem>
<para>
A string defining the function; the meaning depends on the language.
......@@ -76,9 +69,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
</listitem>
</varlistentry>
<varlistentry>
<term>
<replaceable class="parameter">langname</replaceable>
</term>
<term><replaceable class="parameter">langname</replaceable></term>
<listitem>
<para>
may be '<literal>C</literal>', '<literal>sql</literal>',
......@@ -105,9 +96,9 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab
<variablelist>
<varlistentry>
<term>
<returnvalue>CREATE</returnvalue>
</term>
<term><computeroutput>
CREATE
</computeroutput></term>
<listitem>
<para>
This is returned if the command completes successfully.
......@@ -188,13 +179,12 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
</title>
<para>
To create a simple SQL function:
</para>
<programlisting>
CREATE FUNCTION one() RETURNS int4
CREATE FUNCTION one() RETURNS int4
AS 'SELECT 1 AS RESULT'
LANGUAGE 'sql';
SELECT one() AS answer;
SELECT one() AS answer;
<computeroutput>
answer
......@@ -202,6 +192,8 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
1
</computeroutput>
</programlisting>
</para>
<para>
To create a C function, calling a routine from a user-created
shared library. This particular routine calculates a check
......@@ -210,16 +202,16 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
</para>
<programlisting>
<userinput>
CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool
CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool
AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c';
CREATE TABLE product (
CREATE TABLE product (
id char(8) PRIMARY KEY,
eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}')
REFERENCES brandname(ean_prefix),
eancode char(6) CHECK (eancode ~ '[0-9]{6}'),
CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode))
);
);
</userinput>
</programlisting>
</refsect1>
......@@ -251,27 +243,26 @@ in the <citetitle>PostgreSQL Programmer's Guide</citetitle>
</title>
<para>
<note>
<note>
<para>
PSM stands for Persistent Stored Modules. It is a procedural
language and it was originally hoped that PSM would be ratified
as an official standard by late 1996. As of mid-1998, this
has not yet happened, but it is hoped that PSM will
has not yet happened, but it is hoped that PSM will
eventually become a standard.
</para>
</note>
</note>
SQL/PSM <command>CREATE FUNCTION</command> has the following syntax:
<synopsis>
SQL/PSM <command>CREATE FUNCTION</command> has the following syntax:
<synopsis>
CREATE FUNCTION <replaceable class="parameter">name</replaceable>
( [ [ IN | OUT | INOUT ] <replaceable class="parameter">eter</replaceable>eable> <replaceable
( [ [ IN | OUT | INOUT ] <replaceable class="parameter">eter</replaceable>eable>eable> <replaceable
class="parameter">type</replaceable> [, ...] ] )
RETURNS <replaceable class="parameter">rtype</replaceable>
LANGUAGE '<replaceable class="parameter">langname</replaceable>'
ESPECIFIC <replaceable class="parameter">routine</replaceable>
<replaceable class="parameter">SQL-statement</replaceable>
</synopsis>
</synopsis>
</para>
</refsect2>
</refsect1>
......
<REFENTRY ID="SQL-CREATEINDEX">
<REFMETA>
<REFENTRYTITLE>
<refentry id="SQL-CREATEINDEX">
<refmeta>
<refentrytitle>
CREATE INDEX
</REFENTRYTITLE>
<REFMISCINFO>SQL - Language Statements</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
</refentrytitle>
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
CREATE INDEX
</REFNAME>
<REFPURPOSE>
</refname>
<refpurpose>
Constructs a secondary index
</REFPURPOSE>
</refpurpose>
</refnamediv>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-09-09</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>1998-09-09</date>
</refsynopsisdivinfo>
<synopsis>
CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
ON <replaceable class="parameter">table</replaceable> [ USING <replaceable class="parameter">acc_name</replaceable> ]
( <replaceable class="parameter">column</replaceable> [ <replaceable class="parameter">ops_name</replaceable>] [, ...] )
CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
ON <replaceable class="parameter">table</replaceable> [ USING <replaceable class="parameter">acc_name</replaceable> ]
( <replaceable class="parameter">func_name</replaceable>( <replaceable class="parameter">column</replaceable> [, ... ]) <replaceable class="parameter">ops_name</replaceable> )
</SYNOPSIS>
( <replaceable class="parameter">func_name</replaceable>( <replaceable class="parameter">r">col</replaceable>le> [, ... ]) <replaceable class="parameter">ops_name</replaceable> )
</synopsis>
<REFSECT2 ID="R2-SQL-CREATEINDEX-1">
<REFSECT2INFO>
<DATE>1998-09-09</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEINDEX-1">
<refsect2info>
<date>1998-09-09</date>
</refsect2info>
<title>
Inputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
UNIQUE
</TERM>
<LISTITEM>
<PARA>
</title>
<para>
<variablelist>
<varlistentry>
<term>UNIQUE</term>
<listitem>
<para>
Causes the system to check for
duplicate values in the table when the index is created (if data
already exist) and each time data is added. Attempts to
insert or update non-duplicate data will generate an
error.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">index_name</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">index_name</replaceable></term>
<listitem>
<para>
The name of the index to be created.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">table</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">table</replaceable></term>
<listitem>
<para>
The name of the table to be indexed.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">acc_name</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">acc_name</replaceable></term>
<listitem>
<para>
the name of the access method which is to be used for
the index. The default access method is BTREE.
Postgres provides three access methods for secondary indexes:
......@@ -105,29 +98,27 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
</listitem>
</varlistentry>
</variablelist>
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">column</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">column</replaceable></term>
<listitem>
<para>
The name of a column of the table.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">ops_name</replaceable>
</TERM>
<LISTITEM>
<PARA>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">ops_name</replaceable></term>
<listitem>
<para>
An associated operator class.
The following select list returns all ops_names:
<programlisting>
<programlisting>
SELECT am.amname AS acc_name,
opc.opcname AS ops_name,
opr.oprname AS ops_comp
......@@ -137,70 +128,67 @@ SELECT am.amname AS acc_name,
amop.amopclaid = opc.oid AND
amop.amopopr = opr.oid
ORDER BY acc_name, ops_name, ops_comp
</programlisting>
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<replaceable class="parameter">func_name</replaceable>
</TERM>
<LISTITEM>
<PARA>
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">func_name</replaceable></term>
<listitem>
<para>
A user-defined function, which returns a value that can
be indexed.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
</refsect2>
<REFSECT2 ID="R2-SQL-CREATEINDEX-2">
<REFSECT2INFO>
<DATE>1998-09-09</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEINDEX-2">
<refsect2info>
<date>1998-09-09</date>
</refsect2info>
<title>
Outputs
</TITLE>
<PARA>
</title>
<para>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<ReturnValue>CREATE</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
<variablelist>
<varlistentry>
<term><computeroutput>
CREATE
</computeroutput></term>
<listitem>
<para>
The message returned if the index is successfully created.
</PARA>
</LISTITEM>
</VARLISTENTRY>
</para>
</listitem>
</varlistentry>
<VARLISTENTRY>
<TERM>
<ReturnValue>ERROR: Cannot create index: 'index_name' already exists.</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
<varlistentry>
<term><computeroutput>
ERROR: Cannot create index: 'index_name' already exists.
</computeroutput></term>
<listitem>
<para>
This error occurs if it is impossible to create the index.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</REFSECT2>
</REFSYNOPSISDIV>
</refsect2>
</refsynopsisdiv>
<REFSECT1 ID="R1-SQL-CREATEINDEX-1">
<REFSECT1INFO>
<DATE>1998-09-09</DATE>
</REFSECT1INFO>
<TITLE>
<refsect1 id="R1-SQL-CREATEINDEX-1">
<refsect1info>
<date>1998-09-09</date>
</refsect1info>
<title>
Description
</TITLE>
<PARA>
</title>
<para>
<command>CREATE INDEX</command> constructs an index
<replaceable class="parameter">index_name</replaceable>.
on the specified
......@@ -235,35 +223,35 @@ SELECT am.amname AS acc_name,
transformation to apply them to the base data.
</para>
<REFSECT2 ID="R2-SQL-CREATEINDEX-3">
<REFSECT2INFO>
<DATE>1998-09-09</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEINDEX-3">
<refsect2info>
<date>1998-09-09</date>
</refsect2info>
<title>
Notes
</TITLE>
<PARA>
</title>
<para>
Currently, only the BTREE access method supports multi-column
indexes. Up to 7 keys may be specified.
</PARA>
</para>
<para>
Use <command>DROP INDEX</command>
to remove an index.
</para>
</REFSECT2>
</refsect2>
</refsect1>
<REFSECT1 ID="R1-SQL-CREATEINDEX-2">
<TITLE>
<refsect1 id="R1-SQL-CREATEINDEX-2">
<title>
Usage
</TITLE>
<PARA>To create a btree index on the field <literal>title</literal>
</title>
<para>To create a btree index on the field <literal>title</literal>
in the table <literal>films</literal>:
</PARA>
<ProgramListing>
</para>
<programlisting>
CREATE UNIQUE INDEX title_idx
ON films (title);
</ProgramListing>
</programlisting>
<!--
<comment>
......@@ -282,37 +270,36 @@ SELECT * FROM points
</programlisting>
-->
</REFSECT1>
</refsect1>
<REFSECT1 ID="R1-SQL-CREATEINDEX-3">
<TITLE>
<refsect1 id="R1-SQL-CREATEINDEX-3">
<title>
Compatibility
</TITLE>
<PARA>
</PARA>
</title>
<para>
</para>
<REFSECT2 ID="R2-SQL-CREATEINDEX-4">
<REFSECT2INFO>
<DATE>1998-09-09</DATE>
</REFSECT2INFO>
<TITLE>
<refsect2 id="R2-SQL-CREATEINDEX-4">
<refsect2info>
<date>1998-09-09</date>
</refsect2info>
<title>
SQL92
</TITLE>
<PARA>
</title>
<para>
CREATE INDEX is a <productname>Postgres</productname> language extension.
</PARA>
</para>
<para>
There is no <command>CREATE INDEX</command> command in SQL92.
</para>
</refsect2>
</refsect1>
</REFENTRY>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-omittag:nil
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment