Re: cannot CREATE INDEX because it has pending trigger events

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: cannot CREATE INDEX because it has pending trigger events
Дата
Msg-id CAKoxK+7v6HLTbWfzzFURvbadmwncUTVQU_3ghZqTLt16e2aVgQ@mail.gmail.com
обсуждение исходный текст
Ответ на cannot CREATE INDEX because it has pending trigger events  (Simon Kissane <skissane@medallia.com>)
Список pgsql-general
On Tue, Aug 27, 2019 at 9:33 AM Simon Kissane <skissane@medallia.com> wrote:
> If I swap the order of the CREATE UNIQUE INDEX and the INSERT, so the index gets created first, the error doesn't
happen.

It also works removing the INITIALLY DEFERRED from the foreign key,
since it seems you are creating tuples in the right order (at least in
this simplified model).
The index is not created because the foreign key is validated at the
transaction commit.

>
> I don't understand why having a deferred FK to check should stop me from creating a unique index. I also don't
understandwhy this worked in 9.6 but not anymore.
 

I've tested against 12beta2, it would be nice to understand what
changed in (I suspect) SET TRANSACTION.

Luca



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

Предыдущее
От: "Arnaud L."
Дата:
Сообщение: Re: psql \copy hanging
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: cannot CREATE INDEX because it has pending trigger events