Re: can't delete record from second table in rules of view with join select

Поиск
Список
Период
Сортировка
От Sergey Burladyan
Тема Re: can't delete record from second table in rules of view with join select
Дата
Msg-id 200803251457.55714.eshkinkot@gmail.com
обсуждение исходный текст
Ответ на can't delete record from second table in rules of view with join select  (Sergey Burladyan <eshkinkot@gmail.com>)
Ответы Re: can't delete record from second table in rules of view with join select  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hello, all

> not important, is it one rule like:
> create rule v_del as on delete to v do instead (
>        delete from o1 where id = old.o1_id;
>        delete from o2 where id = old.o2_id;
> );
>
> or split into two rule like:
> create rule v_del1 as on delete to v do instead (
>        delete from o1 where id = old.o1_id;
> );
> create rule v_del2 as on delete to v do instead (
>        delete from o2 where id = old.o2_id;
> );

Sorry, after thinking some time about this problem now i may be understand what going on there... %)

When first rule was exec - no OLD row anymore in "v" view, nothing will be joined and in second rule
OLD value is empty... so my question is changed to: is this expected behavior or a bug ? %)

---

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG: PG do not use index
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: why provide cross type arithmetic operators