aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-02-17 11:50:09 +0000
committerBruce Momjian <bruce@momjian.us>2002-02-17 11:50:09 +0000
commitbf4507e3afeac369c8640797fb51c6e4de308456 (patch)
tree1f17e07879720dbb9e43f0800a64e5f42e9da0fd /doc/src
parenta966ac1df0cba2e107c31f801362abf8b47042e3 (diff)
downloadpostgresql-bf4507e3afeac369c8640797fb51c6e4de308456.tar.gz
postgresql-bf4507e3afeac369c8640797fb51c6e4de308456.zip
I think it's important that it's actually documented that they can add
primary keys after the fact! Also, we need to add regression tests for alter table / add primary key and alter table / drop constraint. These shouldn't be added until 7.3 tho methinks... Chris
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_table.sgml11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 29213b96a51..ef58e94a442 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.36 2002/02/16 23:45:48 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.37 2002/02/17 11:50:09 momjian Exp $
PostgreSQL documentation
-->
@@ -295,6 +295,15 @@ ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zip
</para>
</refsect1>
+ <para>
+ To add an automatically named primary key constraint to a table, noting
+ that a table can only ever have one primary key:
+ <programlisting>
+ALTER TABLE distributors ADD PRIMARY KEY (dist_id);
+ </programlisting>
+ </para>
+ </refsect1>
+
<refsect1 id="R1-SQL-ALTERTABLE-3">
<title>
Compatibility