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

From Alvaro Herrera
Subject Re: creating CHECK constraints as NOT VALID
Date
Msg-id 1306896838-sup-80@alvh.no-ip.org
Whole thread Raw
In response to Re: creating CHECK constraints as NOT VALID  (David Fetter <david@fetter.org>)
List pgsql-hackers
Excerpts from David Fetter's message of mar may 31 21:42:08 -0400 2011:

> A colleague brought up an interesting idea that I think is worth
> exploring for all NOT VALID constraints, to wit, is there some way
> (via SQL) to find which rows violate which constraints?  I'm picturing
> some kind of function that could be aggregated into some structure for
> each violating row...

Seems like a job for a plpgsql function with a bunch of exception handlers ...
Some details like the violated constraint name would be hard to extract,
probably, though.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #6046: select current_date crashes postgres
Next
From: Robert Haas
Date:
Subject: Re: [PERFORM] Hash Anti Join performance degradation