public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pete O'Such <[email protected]>
To: [email protected]
Subject: Doc error re: "not null" "not valid"
Date: Thu, 18 Jun 2026 00:15:13 -0400
Message-ID: <CAEdngj81QMQ=_a0DKhX+iUomLE=iPr3X598Pr1O=JyJs0s00Jw@mail.gmail.com> (raw)

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


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Doc error re: "not null" "not valid"
  In-Reply-To: <CAEdngj81QMQ=_a0DKhX+iUomLE=iPr3X598Pr1O=JyJs0s00Jw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox