diff options
Diffstat (limited to 'doc/src/sgml/ref/create_table.sgml')
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index f0c94d591ef..cd234dbf4e3 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -506,25 +506,25 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI <term><literal>PRIMARY KEY ( <replaceable class="PARAMETER">column_name</replaceable> [, ... ] )</> (table constraint)</term> <listitem> <para> - The primary key constraint specifies that a column or columns of a table - can contain only unique (non-duplicate), nonnull values. - Technically, <literal>PRIMARY KEY</literal> is merely a - combination of <literal>UNIQUE</> and <literal>NOT NULL</>, but - identifying a set of columns as primary key also provides - metadata about the design of the schema, as a primary key - implies that other tables - can rely on this set of columns as a unique identifier for rows. + The <literal>PRIMARY KEY</> constraint specifies that a column or + columns of a table can contain only unique (non-duplicate), nonnull + values. Only one primary key can be specified for a table, whether as a + column constraint or a table constraint. </para> <para> - Only one primary key can be specified for a table, whether as a - column constraint or a table constraint. + The primary key constraint should name a set of columns that is + different from the set of columns named by any unique + constraint defined for the same table. (Otherwise, the unique + constraint is redundant and will be discarded.) </para> <para> - The primary key constraint should name a set of columns that is - different from other sets of columns named by any unique - constraint defined for the same table. + <literal>PRIMARY KEY</literal> enforces the same data constraints as + a combination of <literal>UNIQUE</> and <literal>NOT NULL</>, but + identifying a set of columns as the primary key also provides metadata + about the design of the schema, since a primary key implies that other + tables can rely on this set of columns as a unique identifier for rows. </para> </listitem> </varlistentry> |