[Dbix-class] Temporarily turn off table constraints in Postgresql?

John Napiorkowski jjn1056 at yahoo.com
Sun Jul 1 02:35:01 GMT 2007


--- Dennis Daupert <ddaupert at sbcglobal.net> wrote:

> I have tables that mutually reference one another,
> which prevents initial addition of data to the
> tables. EG:
> 
> "page_content_version_fkey" FOREIGN KEY
> (content_version, id) REFERENCES content(version,
> page) ON UPDATE CASCADE ON DELETE CASCADE
> 
> "content_page_fkey" FOREIGN KEY (page) REFERENCES
> page(id) ON UPDATE CASCADE ON DELETE CASCADE
> 
> Is there a way to temporarily disengage or silence
> or otherwise render harmless those constraints to
> allow the data load? Postgresql 81
> 
> I tried running the data load inside a transaction,
> but no joy.
> 
> /dennis

I have a mental TODO to work out a cross database API
for some admin stuff like this, but haven't had time
to work on it yet.  Will be interested it whatever you
come up with.  --john


       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 



More information about the Dbix-class mailing list