Re: Delete rule chain stops unexpectedly

Поиск
Список
Период
Сортировка
От Wiebe Cazemier
Тема Re: Delete rule chain stops unexpectedly
Дата
Msg-id 435902DC.3000807@gmail.com
обсуждение исходный текст
Ответ на Re: Delete rule chain stops unexpectedly  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Delete rule chain stops unexpectedly
Список pgsql-sql
Tom Lane wrote:> The rule that actually deletes the rows from the underlying has to fire> last, since the rows are gone
fromthe view (and hence from OLD) the> moment you delete them.
 

A quote from the postgresql manual:

"But for ON UPDATE and ON DELETE rules, the original query is done after the 
actions added by rules. This ensures that the actions can see the to-be-updated 
or to-be-deleted rows"

So, the actual delete should be done after all the rules. And even if it does 
delete before anything else, that does not explain why "step2" is not inserted 
into the debuglog table. Or, that all the rules _are_ executed when I call the 
query with "explain analayze".


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Delete rule chain stops unexpectedly
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Delete rule chain stops unexpectedly