mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
ALTER TABLE ... ALTER CONSTRAINT for FKs
Allow constraint attributes to be altered, so the default setting of NOT DEFERRABLE can be altered to DEFERRABLE and back. Review by Abhijit Menon-Sen
This commit is contained in:
@ -46,6 +46,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
|
||||
ALTER [ COLUMN ] <replaceable class="PARAMETER">column_name</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
|
||||
ADD <replaceable class="PARAMETER">table_constraint</replaceable> [ NOT VALID ]
|
||||
ADD <replaceable class="PARAMETER">table_constraint_using_index</replaceable>
|
||||
ALTER CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
|
||||
VALIDATE CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable>
|
||||
DROP CONSTRAINT [ IF EXISTS ] <replaceable class="PARAMETER">constraint_name</replaceable> [ RESTRICT | CASCADE ]
|
||||
DISABLE TRIGGER [ <replaceable class="PARAMETER">trigger_name</replaceable> | ALL | USER ]
|
||||
@ -316,6 +317,16 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>ALTER CONSTRAINT</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This form alters the attributes of a constraint that was previously
|
||||
created. Currently only foreign key constraints may be altered.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>VALIDATE CONSTRAINT</literal></term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user