Re: Disable and enable of table and column constraints - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Disable and enable of table and column constraints
Date
Msg-id 1252475738.15729.1.camel@fsopti579.F-Secure.com
Whole thread Raw
In response to Re: Disable and enable of table and column constraints  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
On Tue, 2009-09-08 at 16:07 -0400, Alvaro Herrera wrote:
> Tom Lane wrote:
> > Michael Gould <mgould@intermodalsoftwaresolutions.net> writes:
> > > It would be nice if we could enable and disable column and table
> > > constraints.  I believe that you can do this in Oracle but this is very
> > > handy for testing stored procedures and other external processes.
> > 
> > Drop the constraint and re-add it later...
> 
> That's not very useful when adding it later means grabbing an exclusive
> lock on the table for the whole duration of the full table scan required
> to check the table.

It's also useful to define foreign keys for documentation purposes but
not enforce them for some reason.



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pgbench hard coded constants
Next
From: David Fetter
Date:
Subject: Re: CTE bug?