Subject: The CREATE TABLE documentation groups NOT NULL under table_constraint.

From: PG Doc comments form <[email-masked]>
Date: Fri, 03 Apr 2026 10:27:22 +0000

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/18/ddl.html
Description:

Unlike UNIQUE or CHECK, NOT NULL cannot be used standalone at the table
level in a standard way
Example: CREATE TABLE t (a int, NOT NULL a); fails.
It only works as an "out-of-line" constraint in very specific inheritance
scenarios.

---

From: "David G. Johnston" <[email-masked]>
Date: Sat, 4 Apr 2026 09:04:23 -0700

> It only works as an "out-of-line" constraint in very specific inheritance

As of v18 it works.  v17 and earlier do not document it.

David J.