Re: Deferrable constraint checking with SAVEPOINT?

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: Deferrable constraint checking with SAVEPOINT?
Дата
Msg-id AANLkTim1DABePGnpfPrSeDOlF9afwSaC9KxZxsfNzm-d@mail.gmail.com
обсуждение исходный текст
Ответ на Deferrable constraint checking with SAVEPOINT?  (Mike Toews <mwtoews@gmail.com>)
Список pgsql-general
On 8 June 2010 03:02, Mike Toews <mwtoews@gmail.com> wrote:
> Hi,
>
> I have a question that is not specified in the docs[1]. I am using
> deferrable constraints in a transaction with SET CONSTRAINTS ALL
> DEFERRED. Now I know that DEFERRED constraints are not checked until
> transaction COMMIT (i.e., the end), however are they checked with
> SAVEPOINT (i.e., part-way in)?
>

No, SAVEPOINTs will not force a check. A SAVEPOINT is nothing like a
COMMIT (it's more like a nested BEGIN). The only things that will
cause deferred constraints to be checked are a COMMIT or a SET
CONSTRAINTS .. IMMEDIATE.

Regards,
Dean

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What's the best type of index for an ENUM column?
Следующее
От: John Gage
Дата:
Сообщение: Cognitive dissonance