pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wiebe Cazemier <halfgaar@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Delete rule chain stops unexpectedly
Date: Fri, 21 Oct 2005 10:42:52 -0400
Message-ID: <21436.1129905772@sss.pgh.pa.us> (raw)
In-Reply-To: <4358F79B.1000409@gmail.com>
References: <4358F79B.1000409@gmail.com>

Wiebe Cazemier <halfgaar@gmail.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



view thread (8+ messages)  latest in thread

Message-ID: <21436.1129905772@sss.pgh.pa.us>
Permalink:  ../21436.1129905772@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21436.1129905772@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, halfgaar@gmail.com
  Subject: Re: Delete rule chain stops unexpectedly
  In-Reply-To: <21436.1129905772@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox