Re: BUG #2294: SPI_connect() fails in trigger when a Foreignkey constraint exists on same table as trigger.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2294: SPI_connect() fails in trigger when a Foreignkey constraint exists on same table as trigger.
Дата
Msg-id 3050.1141314273@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2294: SPI_connect() fails in trigger when a Foreignkey constraint exists on same table as trigger.  ("Jim Fitzgerald" <jfitz@spacelink.com>)
Список pgsql-bugs
"Jim Fitzgerald" <jfitz@spacelink.com> writes:
>   It is notable, however, that Postgres is not emitting the following:
>         WARNING:  transaction left non-empty SPI stack
>         HINT:  Check for missing "SPI_finish" calls.

Well, no, because control isn't going to get that far before the
mismatched SPI_connect/SPI_finish calls are noted.

If your theory of the problem were correct then the RI triggers
themselves would cause failures whenever a table had more than one
foreign key.  I feel fairly confident that it's just a bug in your
trigger code.  Aside from the missing SPI_finish, you might be needing
SPI_push/SPI_pop calls if the trigger code invokes anything that might
itself call SPI.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2292: Calling conventions in docs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2295: MemoryContextSwitchTo missing