Re: creating CHECK constraints as NOT VALID

Josh Berkus <josh@agliodbs.com>

From: Josh Berkus <josh@agliodbs.com>
To: Marko Tiikkaja <marko.tiikkaja@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Date: 2011-06-13T23:08:46Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix pg_get_constraintdef to cope with NOT VALID constraints

> I can see why you would want that, but I'd say that's a separate feature
> you need to explicitly request when creating the constraint.  Consider
> what happens in the "old data is garbage, but I want the new data to be
> validated" use case if we allow constraint exclusion on NOT VALID
> constraints.

Yeah, I guess what I'm suggesting is that we should have an ALTER TABLE
... VALID DONT CHECK option.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com