doc: fix ALTER DOMAIN domain_constraint to spell out options
authorBruce Momjian
Fri, 1 Nov 2024 17:54:28 +0000 (13:54 -0400)
committerBruce Momjian
Fri, 1 Nov 2024 17:54:28 +0000 (13:54 -0400)
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/172225092461.915373.6103973717483380183@wrigleys.postgresql.org

Backpatch-through: 12

doc/src/sgml/ref/alter_domain.sgml

index f6704d7557a812d97170ca62970ffc1fd9aa7070..74855172222ec04e5c885a4c7373b742c0d69785 100644 (file)
@@ -41,6 +41,11 @@ ALTER DOMAIN name
     RENAME TO new_name
 ALTER DOMAIN name
     SET SCHEMA new_schema
+
+where domain_constraint is:
+
+[ CONSTRAINT constraint_name ]
+{ NOT NULL | CHECK (expression) }
 
  
 
@@ -79,8 +84,7 @@ ALTER DOMAIN name
     ADD domain_constraint [ NOT VALID ]
     
      
-      This form adds a new constraint to a domain using the same syntax as
-      CREATE DOMAIN.
+      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