public inbox for [email protected]
help / color / mirror / Atom feedFrom: Stuart Campbell <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: [email protected]
Subject: Re: Check whether a NOT NULL check constraint has been validated
Date: Mon, 1 Dec 2025 22:02:00 +1100
Message-ID: <CAAZ6SnyOHAcMHwAhj4fYUN2jp8FMQzSgTotifRG8Rz4tpGEMWQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAAZ6SnyOmabkioC3n8GCk5dWQsx57pCSiZy_x1JEOrY7aejxaA@mail.gmail.com>
<[email protected]>
<[email protected]>
Hi Adrian,
> Now I am not sure what you did.
>
> Are you saying you used a CHECK constraint to check for NULL values?
That's right. Something like:
ALTER TABLE foo ADD CONSTRAINT bar_not_null CHECK (bar IS NOT NULL) NOT
VALID
> If so then pg_constraint.convalidated would work.
You're right. I didn't immediately find what I was looking for, and when I
looked at the docs for pg_constraints, I guess I confused myself with this
comment:
> Not-null constraints are represented in the pg_attribute
<https://www.postgresql.org/docs/16/catalog-pg-attribute.html; catalog, not
here.
Thanks for the assistance.
--
This communication and any attachments may contain confidential information
and are intended to be viewed only by the intended recipients. If you have
received this message in error, please notify the sender immediately by
replying to the original message and then delete all copies of the email
from your systems.
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: Check whether a NOT NULL check constraint has been validated
In-Reply-To: <CAAZ6SnyOHAcMHwAhj4fYUN2jp8FMQzSgTotifRG8Rz4tpGEMWQ@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