X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 905B1DA8DA for ; Fri, 21 Oct 2005 11:42:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69188-07 for ; Fri, 21 Oct 2005 14:42:46 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7A756DA8AF for ; Fri, 21 Oct 2005 11:42:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9LEgqZe021437; Fri, 21 Oct 2005 10:42:52 -0400 (EDT) To: Wiebe Cazemier Cc: pgsql-sql@postgresql.org Subject: Re: Delete rule chain stops unexpectedly In-reply-to: <4358F79B.1000409@gmail.com> References: <4358F79B.1000409@gmail.com> Comments: In-reply-to Wiebe Cazemier message dated "Fri, 21 Oct 2005 16:13:47 +0200" Date: Fri, 21 Oct 2005 10:42:52 -0400 Message-ID: <21436.1129905772@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/245 X-Sequence-Number: 23098 Wiebe Cazemier 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