Re: Delete rule chain stops unexpectedly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wiebe Cazemier <halfgaar(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Delete rule chain stops unexpectedly
Date: 2005-10-21 14:42:52
Message-ID: 21436.1129905772@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Wiebe Cazemier <halfgaar(at)gmail(dot)com> writes:
> which I manipulate with the view "rating_params". The delete rules on this view
> act very strangely.

The rule that actually deletes the rows from the underlying has to fire
last, since the rows are gone from the view (and hence from OLD) the
moment you delete them.

In practice, you'd be way better off using an ON DELETE trigger for
these tasks.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wiebe Cazemier 2005-10-21 15:01:48 Re: Delete rule chain stops unexpectedly
Previous Message Mario Splivalo 2005-10-21 14:32:30 Re: Postgres 7.4.9 slow!