Re: Deferred Constraints Issues

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: kevin kempter <kevin(at)kevinkempterllc(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Deferred Constraints Issues
Date: 2008-03-25 20:27:00
Message-ID: 20080325132356.U1947@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Monnerie 2008-03-26 00:25:51 Re: Failover of the Primary database and starting the standby database in Postgresql in PITR configuraiton?
Previous Message kevin kempter 2008-03-25 20:10:07 Deferred Constraints Issues