Re: FK triggers misused?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: FK triggers misused?
Дата
Msg-id 20070421090141.R65163@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: FK triggers misused?  (cluster <skrald@amossen.dk>)
Список pgsql-performance
On Sat, 21 Apr 2007, cluster wrote:

> I have investigated a bit now and found the following:
>
> When I perform the update the *first* time, the triggers are actually
> not evaluated. But from the second update they are.

Are these in one transaction? If so, then right now after the first
update, the remaining updates will trigger checks if the row modified was
modified in this transaction.  The comment in trigger.c lists the basic
circumstance, although it mentions it in terms of insert and a deferred
FK, I would guess that if there's ever a possibility of two modifications
(including multiple updates or on an immediate constraint) before the
constraint check occurred the same condition could happen.

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

Предыдущее
От: Colin McGuigan
Дата:
Сообщение: Odd problem with planner choosing seq scan
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Odd problem with planner choosing seq scan