Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D83C32E0064 for ; Thu, 3 Apr 2008 17:35:32 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54118-06 for ; Thu, 3 Apr 2008 17:35:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by developer.postgresql.org (Postfix) with ESMTP id CBC892E0030 for ; Thu, 3 Apr 2008 17:35:26 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 1D16D36BA6; Thu, 3 Apr 2008 13:35:15 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 1B83B36BA5; Thu, 3 Apr 2008 13:35:15 -0700 (PDT) Date: Thu, 3 Apr 2008 13:35:15 -0700 (PDT) From: Stephan Szabo To: chester c young Cc: sql pgsql Subject: Re: apparent RI bug In-Reply-To: <811324.18014.qm@web54305.mail.re2.yahoo.com> Message-ID: <20080403132648.O21440@megazone.bigpanda.com> References: <811324.18014.qm@web54305.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/28 X-Sequence-Number: 30567 On Thu, 3 Apr 2008, chester c young wrote: > --- Stephan Szabo wrote: > > > Is it possible you ever had a before delete trigger that just did a > > return > > NULL rather than raising an exception? IIRC, explicitly telling the > > system to ignore the delete will work on the referential actions. > > yes, it is possible, for example, a function without a body or without > a "return old". > > are you saying this would override the RI constraint? If it returned something that would have prevented the delete without an error, yes. > if so, is this by design? It's basically an ongoing question (without concensus AFAIK) about whether a rule or trigger should be allowed to stop the referential action and what should happen if it does.