doc: Clarify ALTER CONSTRAINT enforceability behavior

Andrew Dunstan <andrew@dunslane.net>

Commit: f03ecd26396423cc38898b2479586c7c89ac9a1c
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2026-06-27T21:51:26Z
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>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.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

Files

PathChange+/−
doc/src/sgml/ref/alter_table.sgml modified +12 −2

Discussion