Thread: Disable FK constarints
Hi, I try to load an entire database ( from Oracle via ora2pg ) create table is OK there are some FK's in the database I did insert's with : BEGIN TRANSACTION; SET CONSTRAINTS ALL DEFERRED; insert ... END TRANSACTION; I get: ERROR: insert or update on table "transactions" violates foreign key constraint How can I get rid off the FK CONSTRAINTS during the load ??? Thanks in advance...
Prestation3.EXPLOITATION@nexans.com writes: > I did insert's with : > BEGIN TRANSACTION; > SET CONSTRAINTS ALL DEFERRED; > insert ... > END TRANSACTION; > I get: > ERROR: insert or update on table "transactions" violates foreign key > constraint SET CONSTRAINTS only affects those constraints that are marked DEFERRABLE, which I believe is not the default. regards, tom lane