Re: Catalog domain not-null constraints

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: Catalog domain not-null constraints
Date: 2024-03-20 09:41:33
Message-ID: 878e4da6-b170-48f3-b561-77180c56ebfb@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.03.24 11:02, Aleksander Alekseev wrote:
> Hi,
>
>> Anyway, in order to move this forward, here is an updated patch where
>> the ADD CONSTRAINT ... NOT NULL behavior for domains matches the
>> idempotent behavior of tables. This uses the patch that Jian He posted.
>
> I tested the patch on Raspberry Pi 5 and Intel MacBook and also
> experimented with it. Everything seems to work properly.
>
> Personally I believe new functions such as
> validateDomainNotNullConstraint() and findDomainNotNullConstraint()
> could use a few lines of comments (accepts..., returns..., etc).

Done.

> Also
> I think that the commit message should explicitly say that supporting
> NOT VALID constraints is out of scope of this patch.

Not done. I don't know what NOT VALID has to do with this. This patch
just changes the internal catalog representation, it doesn't claim to
add or change any features. The documentation already accurately states
that NOT VALID is not supported for NOT NULL constraints.

> Except for named nitpicks v4 LGTM.

Committed, thanks.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-03-20 09:43:47 Re: Catalog domain not-null constraints
Previous Message Wolfgang Walther 2024-03-20 09:39:20 Re: Regression tests fail with musl libc because libpq.so can't be loaded