Re: NOT ENFORCED constraint feature

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Amul Sul <sulamul(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Joel Jacobson <joel(at)compiler(dot)org>
Subject: Re: NOT ENFORCED constraint feature
Date: 2025-02-04 13:54:28
Message-ID: cd3e30c3-9763-425f-965a-5817ba91da72@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03.02.25 08:50, Alvaro Herrera wrote:
> On 2025-Feb-03, Ashutosh Bapat wrote:
>
>> VALID, NOT ENFORCED changed to VALID, ENFORCED - data validation
>> required, constraint is enforced
> There's no such thing as a VALID NOT ENFORCED constraint. It just
> cannot exist.

The way I interpret this is that the VALID flag is just recording what
would happen if the constraint was enforced. So you you take a [NOT]
VALID ENFORCED constraint and switch it to NOT ENFORCED and back and you
get back to where you started.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-02-04 13:56:52 Re: NOT ENFORCED constraint feature
Previous Message Peter Eisentraut 2025-02-04 13:52:35 Re: NOT ENFORCED constraint feature