diff options
author | Bruce Momjian | 2024-11-01 17:54:28 +0000 |
---|---|---|
committer | Bruce Momjian | 2024-11-01 17:54:28 +0000 |
commit | 4200fea80e79851994b8eb5a64a3d4420456c977 (patch) | |
tree | 22977d6d1e087a666fa2a3babaa78b05eabd51e4 /doc/src | |
parent | 94a8c19eed6cdaffad8939a41ed89e3c6afa7c94 (diff) |
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: [email protected]
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 12
Diffstat (limited to 'doc/src')
-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 f6704d7557a..74855172222 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 |