Re: View's rule on delete problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: View's rule on delete problem
Дата
Msg-id 27780.1099236555@sss.pgh.pa.us
обсуждение исходный текст
Ответ на View's rule on delete problem  ("Stanislaw Tristan" <stas7775@i.com.ua>)
Список pgsql-general
"Stanislaw Tristan" <stas7775@i.com.ua> writes:
> It's 2 commands, but executing only first. Why?

You didn't show us the view, but I suppose it's an inner join of the two
tables?  As soon as you delete the row from the first table, there's no
longer any matching row in the view, so the second command finds no OLD
row to join against.

Consider making the view a LEFT JOIN and being sure to delete from the
righthand table first.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Replicating sequences
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Interpolation of environment variables in SQL at runtime?