Re: cataloguing NOT NULL constraints

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: cataloguing NOT NULL constraints
Date: 2023-09-05 15:29:56
Message-ID: 202309051529.cbo3eo44kdjh@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-Sep-05, Peter Eisentraut wrote:

> The following information schema views are affected by the not-null
> constraint catalog entries:
>
> 1. CHECK_CONSTRAINTS
> 2. CONSTRAINT_COLUMN_USAGE
> 3. DOMAIN_CONSTRAINTS
> 4. TABLE_CONSTRAINTS
>
> Note that 1 and 3 also contain domain constraints. So as long as the domain
> not-null constraints are not similarly catalogued, we can't delete the
> separate not-null union branch. (3 never had one, so arguably a bit buggy.)
>
> I think we can fix up 4 by just deleting the not-null union branch.
>
> For 2, the simple fix is also easy, but there are some other options, as you
> discuss above.
>
> How do you want to proceed?

I posted as a patch in a separate thread[1]. Let me fix up the
definitions for views 1 and 3 for domains per your comments, and I'll
post in that thread again.

[1] https://postgr.es/m/202309041710.psytrxlsiqex@alvherre.pgsql

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2023-09-05 15:45:24 Re: Make psql's qeury canceling test simple by using signal() routine of IPC::Run
Previous Message Robert Haas 2023-09-05 15:29:33 Re: GUC for temporarily disabling event triggers