Re: Disable FK constarints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Prestation3(dot)EXPLOITATION(at)nexans(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Disable FK constarints
Date: 2006-02-23 16:37:10
Message-ID: 22853.1140712630@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Prestation3(dot)EXPLOITATION(at)nexans(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2006-02-23 16:39:09 Re: How to specify infinity for intervals ?
Previous Message Amrit Angsusing 2006-02-23 16:37:05 Could DBmirror be done with the mechine using RPM installation instaed of souce code [tar.gz] ?