Re: creating CHECK constraints as NOT VALID - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: creating CHECK constraints as NOT VALID
Date
Msg-id 4DE4D265020000250003DF04@gw.wicourts.gov
Whole thread Raw
In response to creating CHECK constraints as NOT VALID  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: creating CHECK constraints as NOT VALID  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> This patch allows you to initially declare a CHECK constraint as
> NOT VALID, similar to what we already allow for foreign keys. 
> That is, you create the constraint without scanning the table and
< after it is committed, it is enforced for new rows; later, all
> rows are checked by running ALTER TABLE VALIDATE CONSTRAINT, which
> doesn't need AccessExclusive thus allowing for better concurrency.
I think it's a valuable feature, not just in terms of timing and
concurrency, but in terms of someone starting with less-than-perfect
data who wants to prevent further degradation while cleaning up the
existing problems.  This feature is present in other databases I've
used.
-Kevin


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: [PATCH] Bug in XPATH() if expression returns a scalar value
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Getting a bug tracker for the Postgres project