public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Alvaro Herrera <[email protected]>
To: Pg Hackers <[email protected]>
Subject: Re: cataloguing NOT NULL constraints
Date: Mon, 27 Mar 2023 15:55:27 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On 15.03.23 23:44, Alvaro Herrera wrote:
> Here's v5.  I removed the business of renaming constraints in child
> relations: recursing now just relies on matching column names.  Each
> column has only one NOT NULL constraint; if you try to add another,
> nothing happens.  All in all, this code is pretty similar to how we
> handle inheritance of columns, which I think is good.

This patch looks pretty okay to me now.  It matches all the functional 
expectations.

I suggest going through the tests carefully again and make sure all the 
changes are sensible and all the comments are correct.  There are a few 
places where the behavior of tests has changed (intentionally) but the 
surrounding comments don't match anymore, or objects that previously 
weren't created now succeed but then affect following tests.  Also, it 
seems some tests are left over from the first variant of this patch 
(where not-null constraints were converted to check constraints), and 
test names or comments should be updated to the current behavior.

I suppose we don't need any changes in pg_dump, since ruleutils.c 
handles that?

The information schema should be updated.  I think the following views:

- CHECK_CONSTRAINTS
- CONSTRAINT_COLUMN_USAGE
- DOMAIN_CONSTRAINTS
- TABLE_CONSTRAINTS

It looks like these have no test coverage; maybe that could be addressed 
at the same time.







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], [email protected]
  Subject: Re: cataloguing 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