violation of refrential integrity

From: "amit singh" <amitsingh_cse(at)mail(dot)com>
To: "pgsql-chat (at) postgresql (dot) org" <pgsql-chat(at)postgresql(dot)org>, pgsql-docs(at)postgresql(dot)org, "andrew (at) libertyrms (dot) info" <andrew(at)libertyrms(dot)info>
Cc: balwant(dot)singh(at)wipro(dot)com, amitkumar(dot)singh(at)wipro(dot)com
Subject: violation of refrential integrity
Date: 2005-02-03 15:46:56
Message-ID: 20050203154656.271B7164005@ws1-4.us4.outblaze.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-chat

<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.postgresql.org/techdocs/hackingreferentialintegrity.php</A></FONT></DIV>
<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>

Attachment Content-Type Size
unknown_filename text/html 2.9 KB

Browse pgsql-chat by date

  From Date Subject
Next Message Alan Aguia 2005-04-08 23:10:03 Pregunta de migracin
Previous Message Dave Page 2005-01-23 20:52:04 Re: Installation of pgsql 8.0 on windows