Re: Catalog domain not-null constraints - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Catalog domain not-null constraints
Date
Msg-id 202311231638.httd7tqo45ux@alvherre.pgsql
Whole thread Raw
In response to Catalog domain not-null constraints  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Catalog domain not-null constraints
List pgsql-hackers
On 2023-Nov-23, Peter Eisentraut wrote:

> This patch set applies the explicit catalog representation of not-null
> constraints introduced by b0e96f3119 for table constraints also to domain
> not-null constraints.

I like the idea of having domain not-null constraints appear in
pg_constraint.

> Since there is no inheritance or primary keys etc., this is much simpler and
> just applies the existing infrastructure to domains as well.

If you create a table with column of domain that has a NOT NULL
constraint, what happens?  I mean, is the table column marked
attnotnull, and how does it behave?  Is there a separate pg_constraint
row for the constraint in the table?  What happens if you do
ALTER TABLE ... DROP NOT NULL for that column?

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Por suerte hoy explotó el califont porque si no me habría muerto
 de aburrido"  (Papelucho)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Catalog domain not-null constraints
Next
From: Tomas Vondra
Date:
Subject: Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION