From 321421de15be0a09ae5cd71317d0deeb50173c9b Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Mon, 25 May 2026 16:59:21 +0800
Subject: [PATCH v1] doc: Clarify ALTER CONSTRAINT enforceability behavior

The ALTER TABLE documentation said that FOREIGN KEY and CHECK
constraints may be altered, but did not distinguish between
deferrability and enforceability attributes.

Clarify that deferrability attributes can currently be altered only for
FOREIGN KEY constraints, while enforceability can be altered for both
FOREIGN KEY and CHECK constraints.  Also document that setting a
constraint to ENFORCED verifies existing rows and resumes checking new
or updated rows.

Author: Chao Li <lic@highgo.com>
---
 doc/src/sgml/ref/alter_table.sgml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index dec34337d1a..af247d82902 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -586,8 +586,18 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
     <listitem>
      <para>
       This form alters the attributes of a constraint that was previously
-      created. Currently <literal>FOREIGN KEY</literal> and <literal>CHECK</literal>
-      constraints may be altered in this fashion, but see below.
+      created.  Currently, the deferrability attributes can be altered only
+      for <literal>FOREIGN KEY</literal> constraints.  The enforceability
+      attribute can be altered for <literal>FOREIGN KEY</literal> and
+      <literal>CHECK</literal> constraints.
+     </para>
+
+     <para>
+      Setting a constraint to <literal>NOT ENFORCED</literal> causes the
+      database system to stop checking it for new or updated rows.  Setting
+      a constraint to <literal>ENFORCED</literal> causes the database system
+      to verify that existing rows satisfy the constraint and to check it
+      for new or updated rows.
      </para>
     </listitem>
    </varlistentry>
-- 
2.50.1 (Apple Git-155)

