public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: jian he <[email protected]>
To: Rushabh Lathia <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
Date: Sun, 06 Apr 2025 06:56:30 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxF3hJL+Lw5CLp56SLoigMwzfekDRQ5-_RJybMQaXRgT=w@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAGPqQf2jXkkcHzicPJD6_PjMCp1cVG-ZNtftp9cvWn6XUve9wA@mail.gmail.com>
	<CACJufxF3hJL+Lw5CLp56SLoigMwzfekDRQ5-_RJybMQaXRgT=w@mail.gmail.com>

Hi

I've been giving this some final polish which have me time to think it through, and I think Peter is right. We should not be adding the new column, but instead RelationBuildTupleDesc should use its existing scan of pg_constraint to determine validity status of constraints. We may need in addition a further value for attnullability that means unknown, "a constraint exists but we don't know yet if it's valid or invalid" for the times when we scanned pg_attribute but not yet pg_constraint. I think it's not too large a patch on top of that we have.

I'm going on a little excursion now but should be back to work on this in a couple of hours.



view thread (2+ messages)

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], [email protected]
  Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints
  In-Reply-To: <[email protected]>

* 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