Re: NOT ENFORCED constraint feature - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: NOT ENFORCED constraint feature
Date
Msg-id CAMsGm5fZUznaA2Ae2FKrw_UUY=s0tZndWwr+cfSeSBjsDKj=uQ@mail.gmail.com
Whole thread Raw
In response to Re: NOT ENFORCED constraint feature  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
On Fri, 14 Feb 2025 at 10:11, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote:
 
> > I think, what you intend to say is clearer with 4 state system {NE, E}
> > * {NV, V} = {(NE, NV), (NE, V), (E, NV), (E, V)} where (NE, V) is
> > unreachable. Let's name them S1, S2, S3, S4 respectively.
> [...]
> > Notice that there are no edges to and from S2.
>
> So why list it as a possible state?

For the sake of combinatorics. :)

Just because there are 2^n combinations of n boolean values does not mean there are 2^n actual meaningful states. That's why we have CHECK constraints.

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pg_stat_statements and "IN" conditions
Next
From: Andrew Dunstan
Date:
Subject: Re: Improve pgindent exclude handling: ignore empty lines