mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
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
This commit is contained in:
@ -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
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -295,6 +295,15 @@ ALTER TABLE distributors ADD CONSTRAINT dist_id_zipcode_key UNIQUE (dist_id, zip
|
|||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</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">
|
<refsect1 id="R1-SQL-ALTERTABLE-3">
|
||||||
<title>
|
<title>
|
||||||
Compatibility
|
Compatibility
|
||||||
|
Reference in New Issue
Block a user