Re: how to disable all pkey/fkey constraints globally - Mailing list pgsql-general

From John R Pierce
Subject Re: how to disable all pkey/fkey constraints globally
Date
Msg-id 4E8B4D39.8030802@hogranch.com
Whole thread Raw
In response to how to disable all pkey/fkey constraints globally  ("J.V." <jvsrvcs@gmail.com>)
List pgsql-general
On 10/04/11 10:59 AM, J.V. wrote:
> Maybe I do not want to drop, so is there a way to simply disable all
> globally (not drop) & then enable all globally?

IF there was such a method (I don't think there is), to reenable the
constraints would require going through every single row of every single
table and verify the constraints are valid prior to enabling them.
this would require global locks on each table so they didn't get updated
between the time said validation starts and when the constraint is
actually enabled to prevent any possibility of inconsistency from
creeping in.

*OUCH*



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


pgsql-general by date:

Previous
From: Rohit Coder
Date:
Subject: Re: Why PGSQL has no developments in the .NET area?
Next
From: "J.V."
Date:
Subject: fail: alter table NOCHECK CONSTRAINT ALL;