Re: change conndeferrable in pg_constraint?

From: "mboscia" <mbrngrboy(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: change conndeferrable in pg_constraint?
Date: 2003-11-12 17:40:15
Message-ID: 3FB2707F.8020005@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cox(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brett Maton 2003-11-12 18:04:12 Column Sizes
Previous Message Rajesh Kumar Mallah 2003-11-12 17:15:20 Re: Locks information