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

Started by Pete O'Such28 days ago3 messagesdocs
Jump to latest
#1Pete O'Such
posuch@gmail.com

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

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Pete O'Such (#1)
Re: Doc error re: "not null" "not valid"

On Wednesday, June 17, 2026, Pete O'Such <posuch@gmail.com> wrote:

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."

You are commenting on version 9.1 documentation but testing version 18.
The 18 docs mention not-null constraints.

David J.

#3Pete O'Such
posuch@gmail.com
In reply to: David G. Johnston (#2)
Re: Doc error re: "not null" "not valid"

You are commenting on version 9.1 documentation but testing version 18.
The 18 docs mention not-null constraints.

That's totally right. Thanks for setting me straight.

Pete

On Thu, Jun 18, 2026 at 12:26 AM David G. Johnston <
david.g.johnston@gmail.com> wrote:

Show quoted text

On Wednesday, June 17, 2026, Pete O'Such <posuch@gmail.com> wrote:

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."

You are commenting on version 9.1 documentation but testing version 18.
The 18 docs mention not-null constraints.

David J.