pg.ddx.io  pgsql-chat@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: amit singh <amitsingh_cse@mail.com>
To: pgsql-chat @ postgresql . org <pgsql-chat@postgresql.org>
To: pgsql-docs@postgresql.org, "andrew @ libertyrms . info" <andrew@libertyrms.info>
Cc: balwant.singh@wipro.com
Cc: amitkumar.singh@wipro.com
Subject: violation of refrential integrity
Date: Thu, 03 Feb 2005 10:46:56 -0500
Message-ID: <20050203154656.271B7164005@ws1-4.us4.outblaze.com> (raw)

<DIV><FONT face=Arial size=2>I'm using eRserver on Postgres 7.2-3 version for doing replication on a 2-node cluster (master/slave).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I was facing the problem of refrential integrity so gone through a online document <FONT color=blue>(Hacking the refrential integrity by Joel Burton</FONT>) in Tech Docs&nbsp;Knowledge base &nbsp;of Postgres , which talks about playing with the pg_trigger table and disabling the&nbsp;field (tgenabled = FALSE ) temporarily&nbsp;to get rid away&nbsp;from triggers (foriegn key constraints).</FONT></DIV>
<DIV><FONT face=Arial size=2>After making the changes I properly shutdown the database and started it up but nothing happens . </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Link to the Tech doc: <A href="http://techdocs.postgresql.org/techdocs/hackingreferentialintegrity.php">http://techdocs.post...;
<DIV><FONT face=Arial color=red size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=red size=2>&nbsp;ERROR:violation of refrential integrity key refrenced from &lt;table2&gt;&nbsp;is&nbsp;&nbsp;not found &nbsp;in &lt;table 1&gt;</FONT></DIV>
<DIV><FONT face=Arial color=red size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;Where table1 is parent of table2.</FONT></DIV>
<DIV><FONT face=Arial size=2>CAUSE OF ERROR: we are trying to insert something in table2 which is not there in table1.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=blue size=2>MY QUERY: Document talks about disabling the tgenabled field on pg_trigger will solve the problem of refrential integrity as it will blindly go and make entries in the table by restricting the triggers to get fired upon INSERTION,DELETION and UPDATION. It also says that pg_dump works in the same way so that table data can be inserted in any order without having to worry about refrential integrity rule.</FONT></DIV>
<DIV><FONT face=Arial color=blue size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=blue size=2>So, is this the version(7.2-3) which is not supporting or something else.</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>A quick reply will be highly appreciated.</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=black size=2>Thanks &amp; Regds,</FONT></DIV>
<DIV><FONT face=Arial color=black size=2>Amit Singh.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><BR>
-- 
<p>___________________________________________________________<br>Sign-up for Ads Free at Mail.com<br>
<a href="http://mail01.mail.com/scripts/payment/adtracking.cgi?bannercode=adsfreejump01"; target="_blank">http://www.mail.com/?sr=signup</a></p;




Message-ID: <20050203154656.271B7164005@ws1-4.us4.outblaze.com>
Permalink:  ../20050203154656.271B7164005@ws1-4.us4.outblaze.com/
Also on:    postgresql.org/message-id/20050203154656.271B7164005@ws1-4.us4.outblaze.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-chat@postgresql.org
  Cc: amitsingh_cse@mail.com, andrew@libertyrms.info, balwant.singh@wipro.com, amitkumar.singh@wipro.com
  Subject: Re: violation of refrential integrity
  In-Reply-To: <20050203154656.271B7164005@ws1-4.us4.outblaze.com>
  References: <20050203154656.271B7164005@ws1-4.us4.outblaze.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox