By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,541 Members | 1,455 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,541 IT Pros & Developers. It's quick & easy.

change conndeferrable in pg_constraint?

P: n/a
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
mb*******@cox.net
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
mb*******@cox.net
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.