Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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=""></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<br>
<a href="" target="_blank"></a></p>

Attachment: unknown_filename
Description: text/html (2.9 KB)

pgsql-chat by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group