pgsql: doc: Clarify ALTER CONSTRAINT enforceability behavior

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Clarify ALTER CONSTRAINT enforceability behavior
Date: 2026-06-27 22:10:21
Message-ID: E1wdbED-000SMk-11@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)highgo(dot)com>
Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Discussion: https://postgr.es/m/E74C57FA-1DD0-4C8E-8FB1-538034752592@gmail.com
Discussion: https://postgr.es/m/711B1ED3-1781-4B6C-A573-B58AF20770E5@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f03ecd26396423cc38898b2479586c7c89ac9a1c

Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2026-06-28 00:05:59 pgsql: pgindent fix for commit effb923d9de
Previous Message Peter Eisentraut 2026-06-27 17:42:33 pgsql: Reject child partition FDWs in FOR PORTION OF