Sergey Levchenko <sector119@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general