Re: cataloguing NOT NULL constraints

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: cataloguing NOT NULL constraints
Date: 2023-03-29 14:46:16
Message-ID: 81b461c4-edab-5d8c-2f88-203108425340@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27.03.23 15:55, Peter Eisentraut wrote:
> 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.

Here are patches for this. I haven't included the expected files for
the tests; this should be checked again that output is correct or the
changes introduced by this patch set are as expected.

The reason we didn't have tests for this before was probably in part
because the information schema made up names for not-null constraints
involving OIDs, so the test wouldn't have been stable.

Feel free to integrate this, or we can add it on afterwards.

Attachment Content-Type Size
0001-Add-tests-for-information-schema-constraints.patch.nocfbot text/plain 2.3 KB
0002-Update-information-schema-for-catalogued-not.patch.nocfbot text/plain 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-29 14:49:04 Re: logical decoding and replication of sequences, take 2
Previous Message Tomas Vondra 2023-03-29 14:28:16 Re: logical decoding and replication of sequences, take 2