Re: can't delete record from second table in rules of view with join select - Mailing list pgsql-bugs

From Sergey Burladyan
Subject Re: can't delete record from second table in rules of view with join select
Date
Msg-id 200803251457.55714.eshkinkot@gmail.com
Whole thread Raw
In response to can't delete record from second table in rules of view with join select  (Sergey Burladyan <eshkinkot@gmail.com>)
Responses Re: can't delete record from second table in rules of view with join select
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG: PG do not use index
Next
From: Bruce Momjian
Date:
Subject: Re: why provide cross type arithmetic operators