Doc error re: "not null" "not valid"

Pete O'Such <posuch@gmail.com>

From: "Pete O'Such" <posuch@gmail.com>
To: pgsql-docs@lists.postgresql.org
Date: 2026-06-18T04:15:13Z
Lists: pgsql-docs
https://www.postgresql.org/docs/9.1/sql-altertable.html

The text for "ADD table_constraint" says that NOT VALID "is currently only
allowed for foreign key constraints." Testing with 18.4 shows that this is
incorrect. A brief example of it working for a NOT NULL constraint is
available here:
https://neon.com/postgresql/18/not-null-as-not-valid

It looks like this is correctly noted as working in the 18.0 release notes
( https://www.postgresql.org/docs/release/18.0/ ), but not in the main docs.

Thank you!

-Pete O'Such