Index: doc/src/sgml/ref/alter_table.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v
retrieving revision 1.25
diff -c -r1.25 alter_table.sgml
*** doc/src/sgml/ref/alter_table.sgml 2001/05/30 13:01:08 1.25
--- doc/src/sgml/ref/alter_table.sgml 2001/08/24 01:47:26
***************
*** 211,219 ****
! In the current implementation, only FOREIGN KEY and CHECK constraints can
! be added to a table. To create a unique constraint, create
! a unique index (see ).
--- 211,219 ----
! In the current implementation, only UNIQUE, FOREIGN KEY and CHECK constraints can
! be added to a table. To create a primary constraint, create
! a unique, not null index (see ).
***************
*** 295,300 ****
--- 295,307 ----
To add a foreign key constraint to a table:
ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses(address) MATCH FULL
+
+
+
+
+ To add a (multi-column) unique constraint to a table:
+
+ ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zipcode)