[nycbug-talk] (OT) Postgres Migration

Jonathan Vanasco nycbug-list at 2xlp.com
Tue Mar 14 12:54:53 EST 2006

I'm migrating from MySQL to Postgres, which I know a bunch of people  
here use

My schema has 161 tables, and heavy use of foreign key constraints.   
the perl script migration utilities out there do an okay job, and I  
can get by with editing the schema dump from there...

but i've run into this one issue - postgres doesn't like it when i  
add a table w/a constraint check that doesn't exist yet.

right now, i'm recursing backwards, and entering the least dependant  
tables first.

just wondering if anyone knows a way to defer constraint checks  
during a transaction - the only docs i could find let one do that on  
a per table basis in the definition - so it would seem that I'd  
create the table with a defferred check, then edit it to not have the  
constraint.  not fun.

if anyone has a pointer, i'd be grateful.

More information about the talk mailing list