diff options
author | Bruce Momjian <bruce@momjian.us> | 2024-11-01 13:54:27 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2024-11-01 13:54:27 -0400 |
commit | b165e7106086a66fa621d5ed7d8f773da0f9d07d (patch) | |
tree | e64484f709fd2d28c1a723b8bc9b58b9d6682eb6 | |
parent | 3a6e352f7994701a532c42e866ec5c1559932ca5 (diff) | |
download | postgresql-b165e7106086a66fa621d5ed7d8f773da0f9d07d.tar.gz postgresql-b165e7106086a66fa621d5ed7d8f773da0f9d07d.zip |
doc: fix ALTER DOMAIN domain_constraint to spell out options
It used to refer to CREATE DOMAIN, but CREATE DOMAIN allows NULL, while
ALTER DOMAIN does not.
Reported-by: elionescu@yahoo.com
Discussion: https://postgr.es/m/172225092461.915373.6103973717483380183@wrigleys.postgresql.org
Backpatch-through: 12
-rw-r--r-- | doc/src/sgml/ref/alter_domain.sgml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/alter_domain.sgml b/doc/src/sgml/ref/alter_domain.sgml index 2db53725139..f8cecefee54 100644 --- a/doc/src/sgml/ref/alter_domain.sgml +++ b/doc/src/sgml/ref/alter_domain.sgml @@ -41,6 +41,11 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> RENAME TO <replaceable class="parameter">new_name</replaceable> ALTER DOMAIN <replaceable class="parameter">name</replaceable> SET SCHEMA <replaceable class="parameter">new_schema</replaceable> + +<phrase>where <replaceable class="parameter">domain_constraint</replaceable> is:</phrase> + +[ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ] +{ NOT NULL | CHECK (<replaceable class="parameter">expression</replaceable>) } </synopsis> </refsynopsisdiv> @@ -79,8 +84,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable> <term><literal>ADD <replaceable class="parameter">domain_constraint</replaceable> [ NOT VALID ]</literal></term> <listitem> <para> - This form adds a new constraint to a domain using the same syntax as - <link linkend="sql-createdomain"><command>CREATE DOMAIN</command></link>. + This form adds a new constraint to a domain. When a new constraint is added to a domain, all columns using that domain will be checked against the newly added constraint. These checks can be suppressed by adding the new constraint using the |