Disable FK constarints

From: Prestation3(dot)EXPLOITATION(at)nexans(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Disable FK constarints
Date: 2006-02-23 10:30:46
Message-ID: OF36709185.B9B0264C-ONC125711E.0038B2BB-C125711E.0039C017@NEXANS.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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...

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-23 11:15:07 Re: How do I use the backend APIs
Previous Message A. Kretschmer 2006-02-23 10:12:45 Re: actual SQL statement