Commit 50b10b8a authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Fix up markup to allow building.

Adjust two-word substitution parameters to be one word only to reduce
 possible ambiguity.
parent 398bb1fc
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.20 2000/04/11 14:43:54 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.21 2000/04/12 04:40:03 thomas Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -451,13 +451,13 @@ CREATE TABLE distributors ( ...@@ -451,13 +451,13 @@ CREATE TABLE distributors (
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] { [ [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] { [
NULL | NOT NULL ] | UNIQUE | PRIMARY KEY | CHECK <replaceable NULL | NOT NULL ] | UNIQUE | PRIMARY KEY | CHECK <replaceable
class="parameter">constraint</replaceable> | REFERENCES class="parameter">constraint</replaceable> | REFERENCES
<replaceable class="parameter">referenced table</replaceable> <replaceable class="parameter">reftable</replaceable>
(<replaceable class="parameter">referenced column</replaceable>) (<replaceable class="parameter">refcolumn</replaceable>)
[ MATCH <replaceable class="parameter">match type</replaceable> ] [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
[ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON DELETE <replaceable class="parameter">action</replaceable> ]
[ ON UPDATE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
[ INITIALLY <replaceable class="parameter"> check time </replaceable> ] } [ INITIALLY <replaceable class="parameter">checktime</replaceable> ] }
[, ...] [, ...]
</synopsis> </synopsis>
</para> </para>
...@@ -938,12 +938,12 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -938,12 +938,12 @@ ERROR: Cannot insert a duplicate key into a unique index.
</title> </title>
<synopsis> <synopsis>
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES [ CONSTRAINT <replaceable class="parameter">name</replaceable> ] REFERENCES
<replaceable class="parameter">referenced table</replaceable> [ ( <replaceable class="parameter"> referenced column</replaceable> ) ] <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> ) ]
[ MATCH <replaceable class="parameter">matchtype</replaceable> ] [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
[ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON DELETE <replaceable class="parameter">action</replaceable> ]
[ ON UPDATE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
[ INITIALLY <replaceable class="parameter"> check time </replaceable> ] [ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
</synopsis> </synopsis>
<para> <para>
The REFERENCES constraint specifies a rule that a column The REFERENCES constraint specifies a rule that a column
...@@ -954,6 +954,7 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -954,6 +954,7 @@ ERROR: Cannot insert a duplicate key into a unique index.
<refsect3 id="R3-SQL-REFERENCES-1"> <refsect3 id="R3-SQL-REFERENCES-1">
<title>Inputs</title> <title>Inputs</title>
<para> <para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
...@@ -964,21 +965,23 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -964,21 +965,23 @@ ERROR: Cannot insert a duplicate key into a unique index.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">referenced table</replaceable></term> <term><replaceable class="parameter">reftable</replaceable></term>
<listitem> <listitem>
<para> <para>
The table that contains the data to check against. The table that contains the data to check against.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">referenced column</replaceable></term> <term><replaceable class="parameter">refcolumn</replaceable></term>
<listitem> <listitem>
<para> <para>
The column in the <replaceable class="parameter">referenced table</replaceable> The column in <replaceable class="parameter">reftable</replaceable>
to check the data against. If this is not specified, the PRIMARY KEY of the to check the data against. If this is not specified, the PRIMARY KEY of the
<replaceable class="parameter">referenced table</replaceable> is used. <replaceable class="parameter">reftable</replaceable> is used.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -1096,6 +1099,7 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -1096,6 +1099,7 @@ ERROR: Cannot insert a duplicate key into a unique index.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term> [ NOT ] DEFERRABLE </term> <term> [ NOT ] DEFERRABLE </term>
<listitem> <listitem>
...@@ -1105,25 +1109,32 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -1105,25 +1109,32 @@ ERROR: Cannot insert a duplicate key into a unique index.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>INITIALLY <replaceable class="parameter"> check time </replaceable></term> <term>INITIALLY <replaceable class="parameter">checktime</replaceable></term>
<listitem> <listitem>
<para> <para>
<replaceable class="parameter">check time</replaceable> has two possible values <replaceable class="parameter">checktime</replaceable> has two possible values
which specify the default time to check the constraint. which specify the default time to check the constraint.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>DEFERRED</term> <term>DEFERRED</term>
<para> <listitem>
Check this constraint at the end of the transaction. <para>
</para> Check this constraint at the end of the transaction.
</para>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>IMMEDIATE</term> <term>IMMEDIATE</term>
<para> <listitem>
Check this constraint after each statement. <para>
</para> Check this constraint after each statement.
</varlistentry> </para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</para> </para>
</listitem> </listitem>
...@@ -1150,7 +1161,7 @@ ERROR: Cannot insert a duplicate key into a unique index. ...@@ -1150,7 +1161,7 @@ ERROR: Cannot insert a duplicate key into a unique index.
<varlistentry> <varlistentry>
<term><computeroutput> <term><computeroutput>
ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from
<replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">referenced table</replaceable> <replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">reftable</replaceable>
</computeroutput></term> </computeroutput></term>
<listitem> <listitem>
<para> <para>
...@@ -1193,13 +1204,14 @@ ERROR: <replaceable class="parameter">name</replaceable> referential integrity ...@@ -1193,13 +1204,14 @@ ERROR: <replaceable class="parameter">name</replaceable> referential integrity
</title> </title>
<para> <para>
Currently <productname>Postgres</productname> only supports Currently <productname>Postgres</productname> only supports
MATCH FULL and an unspecified MATCH type. MATCH FULL and an unspecified match type.
In addition, the referenced columns are supposed to be In addition, the referenced columns are supposed to be
the columns of a UNIQUE constraint in the referenced table, the columns of a UNIQUE constraint in the referenced table,
however <productname>Postgres</productname> does not however <productname>Postgres</productname> does not
enforce this. enforce this.
</para> </para>
</refsect3> </refsect3>
</refsect2>
</refsect1> </refsect1>
<refsect1 id="R1-SQL-TABLECONSTRAINT-1"> <refsect1 id="R1-SQL-TABLECONSTRAINT-1">
...@@ -1211,13 +1223,13 @@ ERROR: <replaceable class="parameter">name</replaceable> referential integrity ...@@ -1211,13 +1223,13 @@ ERROR: <replaceable class="parameter">name</replaceable> referential integrity
[ CONSTRAINT name ] { PRIMARY KEY | UNIQUE } ( <replaceable class="parameter">column</replaceable> [, ...] ) [ CONSTRAINT name ] { PRIMARY KEY | UNIQUE } ( <replaceable class="parameter">column</replaceable> [, ...] )
[ CONSTRAINT name ] CHECK ( <replaceable>constraint</replaceable> ) [ CONSTRAINT name ] CHECK ( <replaceable>constraint</replaceable> )
[ CONSTRAINT name ] FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) [ CONSTRAINT name ] FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] )
REFERENCES <replaceable class="parameter">referenced table</replaceable> REFERENCES <replaceable class="parameter">reftable</replaceable>
(<replaceable class="parameter">referenced column</replaceable> [, ...] ) (<replaceable class="parameter">refcolumn</replaceable> [, ...] )
[ MATCH <match type> ] [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
[ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON DELETE <replaceable class="parameter">action</replaceable> ]
[ ON UPDATE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
[ INITIALLY <replaceable class="parameter"> check time </replaceable> ] [ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
</synopsis> </synopsis>
</para> </para>
<refsect2 id="R2-SQL-TABLECONSTRAINT-1"> <refsect2 id="R2-SQL-TABLECONSTRAINT-1">
...@@ -1464,7 +1476,7 @@ CREATE TABLE distributors ( ...@@ -1464,7 +1476,7 @@ CREATE TABLE distributors (
</refsect3> </refsect3>
</refsect2> </refsect2>
<refsect2 id="R2-SQL-REFERENCES-1"> <refsect2 id="R2-SQL-REFERENCES-2">
<refsect2info> <refsect2info>
<date>2000-02-04</date> <date>2000-02-04</date>
</refsect2info> </refsect2info>
...@@ -1474,12 +1486,12 @@ CREATE TABLE distributors ( ...@@ -1474,12 +1486,12 @@ CREATE TABLE distributors (
<synopsis> <synopsis>
[ CONSTRAINT <replaceable class="parameter">name</replaceable> ] [ CONSTRAINT <replaceable class="parameter">name</replaceable> ]
FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFERENCES FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFERENCES
<replaceable class="parameter">referenced table</replaceable> [ ( <replaceable class="parameter">referenced column</replaceable> [, ...] ) ] <replaceable class="parameter">reftable</replaceable> [ ( <replaceable class="parameter">refcolumn</replaceable> [, ...] ) ]
[ MATCH <replaceable class="parameter">matchtype</replaceable> ] [ MATCH <replaceable class="parameter">matchtype</replaceable> ]
[ ON DELETE <replaceable class="parameter">action</replaceable> ] [ ON DELETE <replaceable class="parameter">action</replaceable> ]
[ ON UPDATE <replaceable class="parameter">action</replaceable> ] [ ON UPDATE <replaceable class="parameter">action</replaceable> ]
[ [ NOT ] DEFERRABLE ] [ [ NOT ] DEFERRABLE ]
[ INITIALLY <replaceable class="parameter"> check time </replaceable> ] [ INITIALLY <replaceable class="parameter">checktime</replaceable> ]
</synopsis> </synopsis>
<para> <para>
The REFERENCES constraint specifies a rule that a column The REFERENCES constraint specifies a rule that a column
...@@ -1488,7 +1500,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1488,7 +1500,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
a FOREIGN KEY table constraint. a FOREIGN KEY table constraint.
</para> </para>
<refsect3 id="R3-SQL-REFERENCES-1"> <refsect3 id="R3-SQL-REFERENCES-5">
<title>Inputs</title> <title>Inputs</title>
<para> <para>
<variablelist> <variablelist>
...@@ -1509,7 +1521,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1509,7 +1521,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">referenced table</replaceable></term> <term><replaceable class="parameter">reftable</replaceable></term>
<listitem> <listitem>
<para> <para>
The table that contains the data to check against. The table that contains the data to check against.
...@@ -1520,9 +1532,9 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1520,9 +1532,9 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
<term><replaceable class="parameter">referenced column</replaceable> [, ...]</term> <term><replaceable class="parameter">referenced column</replaceable> [, ...]</term>
<listitem> <listitem>
<para> <para>
One or more column in the <replaceable class="parameter">referenced table</replaceable> One or more column in the <replaceable class="parameter">reftable</replaceable>
to check the data against. If this is not specified, the PRIMARY KEY of the to check the data against. If this is not specified, the PRIMARY KEY of the
<replaceable class="parameter">referenced table</replaceable> is used. <replaceable class="parameter">reftable</replaceable> is used.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -1650,23 +1662,27 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1650,23 +1662,27 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>INITIALLY <replaceable class="parameter"> check time </replaceable></term> <term>INITIALLY <replaceable class="parameter">checktime</replaceable></term>
<listitem> <listitem>
<para> <para>
<replaceable class="parameter">check time</replaceable> has two possible values <replaceable class="parameter">checktime</replaceable> has two possible values
which specify the default time to check the constraint. which specify the default time to check the constraint.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>DEFERRED</term> <term>DEFERRED</term>
<para> <listitem>
Check this constraint at the end of the transaction. <para>
</para> Check this constraint at the end of the transaction.
</para>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>IMMEDIATE</term> <term>IMMEDIATE</term>
<para> <listitem>
Check this constraint after each statement. <para>
</para> Check this constraint after each statement.
</para>
</listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</para> </para>
...@@ -1675,7 +1691,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1675,7 +1691,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
</variablelist> </variablelist>
</para> </para>
</refsect3> </refsect3>
<refsect3 id="R3-SQL-REFERENCES-2"> <refsect3 id="R3-SQL-REFERENCES-6">
<refsect3info> <refsect3info>
<date>2000-02-04</date> <date>2000-02-04</date>
</refsect3info> </refsect3info>
...@@ -1692,7 +1708,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE ...@@ -1692,7 +1708,7 @@ FOREIGN KEY ( <replaceable class="parameter">column</replaceable> [, ...] ) REFE
<varlistentry> <varlistentry>
<term><computeroutput> <term><computeroutput>
ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from ERROR: <replaceable class="parameter">name</replaceable> referential integrity violation - key referenced from
<replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">referenced table</replaceable> <replaceable class="parameter">table</replaceable> not found in <replaceable class="parameter">reftable</replaceable>
</computeroutput></term> </computeroutput></term>
<listitem> <listitem>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment