Re: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED
Дата
Msg-id 15623.1260382207@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED  (Sergey Levchenko <sector119@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Sergey Levchenko
Дата:
Сообщение: Problem with SET CONSTRAINTS some_constraint_fkey DEFERRED
Следующее
От: CG
Дата:
Сообщение: pg_dump and ON DELETE CASCADE problem