aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-04-03 08:11:51 +0300
committerPeter Eisentraut <peter_e@gmx.net>2012-04-03 08:11:51 +0300
commit38b9693fd9847f4dcf6ff2fc469a7f2aac6385d9 (patch)
tree2c3e204e5504a6780a8d8ed37fed08b8e32fe63e /doc/src
parentc2cc5c347440e48bc4d0e4ed083db2f3966a0e90 (diff)
downloadpostgresql-38b9693fd9847f4dcf6ff2fc469a7f2aac6385d9.tar.gz
postgresql-38b9693fd9847f4dcf6ff2fc469a7f2aac6385d9.zip
Add support for renaming domain constraints
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_domain.sgml29
1 files changed, 28 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/alter_domain.sgml b/doc/src/sgml/ref/alter_domain.sgml
index 2511a125d38..c59975af033 100644
--- a/doc/src/sgml/ref/alter_domain.sgml
+++ b/doc/src/sgml/ref/alter_domain.sgml
@@ -32,6 +32,8 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
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>
OWNER TO <replaceable class="PARAMETER">new_owner</replaceable>
@@ -103,6 +105,15 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
</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>
<para>
@@ -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>
@@ -226,6 +237,15 @@ ALTER DOMAIN <replaceable class="PARAMETER">name</replaceable>
</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>
<para>
@@ -289,6 +309,13 @@ ALTER DOMAIN zipcode DROP CONSTRAINT zipchk;
</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>
ALTER DOMAIN zipcode SET SCHEMA customers;