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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "jnishtha305(at)gmail(dot)com" <jnishtha305(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: The CREATE TABLE documentation groups NOT NULL under table_constraint.
Date: 2026-04-04 16:04:23
Message-ID: CAKFQuwbiSN8brEGpMaKWVcfyMBz5ikZwu8AprCZQCS1wd9dNVQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Friday, April 3, 2026, PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:

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

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

David J.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Maciek Sakrejda 2026-04-05 18:08:01 Re: doc: Clarify ANALYZE VERBOSE output
Previous Message PG Doc comments form 2026-04-03 10:27:22 The CREATE TABLE documentation groups NOT NULL under table_constraint.