Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 2C0C89FBDA3 for ; Tue, 26 Jun 2007 16:33:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 32586-01-5 for ; Tue, 26 Jun 2007 16:32:52 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 3B9F39FBDE6 for ; Tue, 26 Jun 2007 16:32:52 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I3GmE-0004Qt-Tz for pgsql-sql@postgresql.org; Tue, 26 Jun 2007 21:32:38 +0200 Received: from cc503261-a.eelde1.dr.home.nl ([212.204.130.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jun 2007 21:32:38 +0200 Received: from halfgaar by cc503261-a.eelde1.dr.home.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jun 2007 21:32:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Wiebe Cazemier Subject: Delete rules and functions Date: Tue, 26 Jun 2007 21:32:22 +0200 Lines: 10 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cc503261-a.eelde1.dr.home.nl User-Agent: KNode/0.10.4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/226 X-Sequence-Number: 28716 Hi, I have the following scenerio: a rule on a view which executes a function by means of a select call, which in turn deletes from a table which has on-delete rules on it. When the function is called from the rule, the subsequent delete call in the function doesn't cause the on-delete rules on the table to be taken into account. Is that a bug? Or is the query rewriting not possible from inside functions?