Re: RULE: ON DELETE doesn't stack deletes

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Malcolm Hutty <msah-postgres(at)hutty(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: RULE: ON DELETE doesn't stack deletes
Date: 2002-11-26 14:56:19
Message-ID: 1038322578.2508.11.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rbt(dot)ca>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Adam Buraczewski 2002-11-26 16:32:25 Re: PostgreSQL 7.3rc1: initdb fais with '-W' switch given in the command line.
Previous Message Rod Taylor 2002-11-26 14:43:23 Re: vacumm error