Re: PostgreSQL domains and NOT NULL constraint - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PostgreSQL domains and NOT NULL constraint
Date
Msg-id 461950.1698109348@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL domains and NOT NULL constraint  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
List pgsql-hackers
Matthias van de Meent <boekewurm+postgres@gmail.com> writes:
> On Mon, 23 Oct 2023, 19:34 Tom Lane, <tgl@sss.pgh.pa.us> wrote:
>> After ruminating on this for awhile, here's a straw-man proposal:
>> ...

> How does this work w.r.t. concurrently created tables that contain the
> domain?

It wouldn't change that at all I think.  I had noticed that we'd
probably need to tweak validateDomainConstraint() to ensure it applies
the same semantics that INSERT/UPDATE do --- although with Isaac's
idea to enable better tracking of which constraints will fail on NULL,
maybe just a blind application of the constraint expression will still
be close enough.

I agree that concurrent transactions can create violations of the new
constraint, but (a) that's true now, (b) I have no good ideas about
how to improve it, and (c) it seems like an independent problem.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: run pgindent on a regular basis / scripted manner
Next
From: Amit Langote
Date:
Subject: Re: run pgindent on a regular basis / scripted manner