Re: Rule execution bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule execution bug
Дата
Msg-id 27385.1064515907@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rule execution bug  (Viacheslav N Tararin <taras@dekasoft.com.ua>)
Список pgsql-bugs
Viacheslav N Tararin <taras@dekasoft.com.ua> writes:
> For the next schema rule "d_analysis_plan" perform only first DELETE
> statement, second statement not performed.

You did not show us the definition of "analysis_plan", but I'll bet it's
a view joining t_sub_plan and t_account_plan.  If so, this is not a bug.
After the first DELETE, there is no longer anything in the view matching
the id, and so the second DELETE finds nothing to delete.

You might have better luck using ON DELETE CASCADE foreign-key
references to accomplish the results you want.

            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Postgresql 'eats' all mi data partition
Следующее
От: Javier Carlos
Дата:
Сообщение: Re: Postgresql 'eats' all mi data partition