Re: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED
Date
Msg-id 15623.1260382207@sss.pgh.pa.us
Whole thread Raw
In response to Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED  (Sergey Levchenko <sector119@gmail.com>)
List pgsql-general
Sergey Levchenko <sector119@gmail.com> writes:
> Why I get: update or delete on table "people" violates foreign key
> constraint "transactions_person_id_fkey" on table "transactions"

> But before that query I run: SET CONSTRAINTS
> transactions_person_id_fkey DEFERRED; before delete from people table

It looks to me like it's doing what it is supposed to, ie, applying
the check at COMMIT.

            regards, tom lane

pgsql-general by date:

Previous
From: Sergey Levchenko
Date:
Subject: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED
Next
From: CG
Date:
Subject: pg_dump and ON DELETE CASCADE problem