Skip to content

Commit 0a0a0f2

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 787bd3d commit 0a0a0f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/src/sgml/ref/alter_domain.sgml

Lines changed: 6 additions & 2 deletions
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-
<link linkend="sql-createdomain"><command>CREATE DOMAIN</command></link>.
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy