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

From: Sergey Burladyan <eshkinkot(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: can't delete record from second table in rules of view with join select
Date: 2008-03-25 11:57:55
Message-ID: 200803251457.55714.eshkinkot@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ? %)

---

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2008-03-25 13:04:55 Re: why provide cross type arithmetic operators
Previous Message Alvaro Herrera 2008-03-25 11:55:00 Re: BUG: PG do not use index