Re: Disable FK constarints - Mailing list pgsql-general

From Tom Lane
Subject Re: Disable FK constarints
Date
Msg-id 22853.1140712630@sss.pgh.pa.us
Whole thread Raw
In response to Disable FK constarints  (Prestation3.EXPLOITATION@nexans.com)
List pgsql-general
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

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: upgrade PostgreSQL 8.x on production FreeBSD
Next
From: Karsten Hilbert
Date:
Subject: Re: How to specify infinity for intervals ?