Skip to content

Commit f9b4464

Browse files
committed
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
1 parent 930d90a commit f9b4464

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/src/sgml/ref/alter_domain.sgml

+6-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable>
4141
RENAME TO <replaceable class="parameter">new_name</replaceable>
4242
ALTER DOMAIN <replaceable class="parameter">name</replaceable>
4343
SET SCHEMA <replaceable class="parameter">new_schema</replaceable>
44+
45+
<phrase>where <replaceable class="parameter">domain_constraint</replaceable> is:</phrase>
46+
47+
[ CONSTRAINT <replaceable class="parameter">constraint_name</replaceable> ]
48+
{ NOT NULL | CHECK (<replaceable class="parameter">expression</replaceable>) }
4449
</synopsis>
4550
</refsynopsisdiv>
4651

@@ -79,8 +84,7 @@ ALTER DOMAIN <replaceable class="parameter">name</replaceable>
7984
<term><literal>ADD <replaceable class="parameter">domain_constraint</replaceable> [ NOT VALID ]</literal></term>
8085
<listitem>
8186
<para>
82-
This form adds a new constraint to a domain using the same syntax as
83-
<xref linkend="sql-createdomain"/>.
87+
This form adds a new constraint to a domain.
8488
When a new constraint is added to a domain, all columns using that
8589
domain will be checked against the newly added constraint. These
8690
checks can be suppressed by adding the new constraint using the

0 commit comments

Comments
 (0)