Re: change conndeferrable in pg_constraint? - Mailing list pgsql-general

From mboscia
Subject Re: change conndeferrable in pg_constraint?
Date
Msg-id 3FB2707F.8020005@cox.net
Whole thread Raw
In response to change conndeferrable in pg_constraint?  ("mboscia" <mbrngrboy@cox.net>)
List pgsql-general
 charset="ISO-8859-1";
    charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3

What I Did.

I updated the pg_constraint table and set the condeferrable column to
't' where the contype was 'f' for foriegn key.  I also updated the
pg_trigger table and set tgdeferrable to 't' where tgisconstraint  was
't'.

The transaction that I was trying to defer worked perfectly.  I also did
a pg_dump and noticed that the definition of the constraints now
contained the keyword deferrable.

I am still not sure if this is an accepted method.
---

I have a situation where I need to set my constraints and keys
deferrable.  Is it safe to update the condeferrable flag in
pg_constraint to true to make this happen?  The alternative is to drop
all the constraints and add them back as deferrable.
Michael L. Boscia
mbrngrboy@cox.net


pgsql-general by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: Problem with FKEYS
Next
From: Robert Treat
Date:
Subject: Re: [off-topic] Bugtracker using PostgreSQL