Changing constraints to deferrable

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Changing constraints to deferrable
Date: 2005-03-22 18:20:48
Message-ID: 873bunbkzj.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I want all my foreign key constraints to be deferrable. They were all created
with the default (not deferrable).

Is it enough to just do

update pg_constraint set condeferrable = 't' where contype = 'f';

?

It doesn't seem to be enough. I still get constraint violations as soon as I
try to delete a referenced column even after "set constraints all deferred".

--
greg

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-03-22 18:24:07 Re: Constraint problem
Previous Message Tom Lane 2005-03-22 18:10:47 Re: Using rule with function for view delete gives error on OLD.* type