Re: Deferred Constraints Issues - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: Deferred Constraints Issues
Date
Msg-id 20080325132356.U1947@megazone.bigpanda.com
Whole thread Raw
In response to Deferred Constraints Issues  (kevin kempter <kevin@kevinkempterllc.com>)
List pgsql-admin
On Tue, 25 Mar 2008, kevin kempter wrote:

> I've placed this sql in a script:
>
> psql my_db <<!
> begin;
> SET CONSTRAINTS ALL DEFERRED ;
> delete from account where 1 = 1;
> delete from cust where 1 = 1;
> delete from cust_type where 1 = 1;
> delete from cust_orders where 1 = 1;
> commit;
> !
>
> The tables have relationships, however I expect the 'SET CONSTRAINTS
> ALL DEFERRED' to defer constraint checks.

IIRC it's defined to only defer constraints created with DEFERRABLE and/or
INITIALLY DEFERRED. The default is NOT DEFERRABLE.

pgsql-admin by date:

Previous
From: kevin kempter
Date:
Subject: Deferred Constraints Issues
Next
From: Michael Monnerie
Date:
Subject: Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?