mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add support for renaming domain constraints
This commit is contained in:
@ -31,6 +31,8 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
ADD <replaceable class="PARAMETER">domain_constraint</replaceable> [ NOT VALID ]
|
||||
ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
DROP CONSTRAINT [ IF EXISTS ] <replaceable class="PARAMETER">constraint_name</replaceable> [ RESTRICT | CASCADE ]
|
||||
ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
RENAME CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> TO <replaceable class="PARAMETER">new_constraint_name</replaceable>
|
||||
ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
VALIDATE CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable>
|
||||
ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
@ -102,6 +104,15 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>RENAME CONSTRAINT</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This form changes the name of a constraint on a domain.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>VALIDATE CONSTRAINT</term>
|
||||
<listitem>
|
||||
@ -182,7 +193,7 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
<term><replaceable class="PARAMETER">constraint_name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of an existing constraint to drop.
|
||||
Name of an existing constraint to drop or rename.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -225,6 +236,15 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="PARAMETER">new_constraint_name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new name for the constraint.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><replaceable class="PARAMETER">new_owner</replaceable></term>
|
||||
<listitem>
|
||||
@ -288,6 +308,13 @@ ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To rename a check constraint on a domain:
|
||||
<programlisting>
|
||||
ALTER DOMAIN zipcode RENAME CONSTRAINT zipchk TO zip_check;
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To move the domain into a different schema:
|
||||
<programlisting>
|
||||
|
Reference in New Issue
Block a user