Re: RULE: ON DELETE doesn't stack deletes - Mailing list pgsql-bugs

From Rod Taylor
Subject Re: RULE: ON DELETE doesn't stack deletes
Date
Msg-id 1038322578.2508.11.camel@jester
Whole thread Raw
In response to RULE: ON DELETE doesn't stack deletes  (Malcolm Hutty <msah-postgres@hutty.com>)
Responses Re: RULE: ON DELETE doesn't stack deletes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Confirmed this problem on cvs-tip.

Replacing the DO INSTEAD ( DELETE....) with DO INSTEAD (INSERT...)
allows multiple insert statements which function fine using OLD.a_data
and OLD.b_data.

So it must be something else.


Could it be because once the DELETE FROM A has run the tuple no longer
exists in the view?


On Wed, 2002-11-20 at 10:49, Malcolm Hutty wrote:
> According to the manual you can stack multiple queries in a RULE:

> CREATE RULE R_DEL_AB AS
> ON DELETE TO V_AB
> DO INSTEAD
> (
> DELETE FROM A WHERE a_data=OLD.a_data;
> DELETE FROM B WHERE b_data=OLD.b_data;
> );

--
Rod Taylor <rbt@rbt.ca>

pgsql-bugs by date:

Previous
From: Rod Taylor
Date:
Subject: Re: vacumm error
Next
From: Stephan Szabo
Date:
Subject: Re: RULE: ON DELETE doesn't stack deletes