From bf4507e3afeac369c8640797fb51c6e4de308456 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 17 Feb 2002 11:50:09 +0000 Subject: [PATCH] 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 --- doc/src/sgml/ref/alter_table.sgml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 29213b96a5..ef58e94a44 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -1,5 +1,5 @@ @@ -295,6 +295,15 @@ ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zip + + To add an automatically named primary key constraint to a table, noting + that a table can only ever have one primary key: + +ALTER TABLE distributors ADD PRIMARY KEY (dist_id); + + + + Compatibility