public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Alvaro Herrera <[email protected]>
To: Pg Hackers <[email protected]>
Subject: Re: information_schema and not-null constraints
Date: Wed, 6 Sep 2023 13:02:50 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 05.09.23 18:24, Alvaro Herrera wrote:
> 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.
>
> After looking at what happens for domain constraints in older versions
> (I tested 15, but I suppose this applies everywhere), I notice that we
> don't seem to handle them anywhere that I can see. My quick exercise is
> just
>
> create domain nnint as int not null;
> create table foo (a nnint);
>
> and then verify that this constraint shows nowhere -- it's not in
> DOMAIN_CONSTRAINTS for starters, which is I think the most obvious place.
> And nothing is shown in CHECK_CONSTRAINTS nor TABLE_CONSTRAINTS either.
>
> This did ever work in the past? I tested with 9.3 and didn't see
> anything there either.
No, this was never implemented. (As I wrote in my other message on the
other thread, arguably a bit buggy.) We could fix this separately,
unless we are going to implement catalogued domain not-null constraints
soon.
view thread (5+ 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: information_schema and 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