Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 6E4DC475C82 for ; Wed, 17 Jul 2002 13:09:03 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id D8258D60B; Wed, 17 Jul 2002 10:09:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id CDD405C02; Wed, 17 Jul 2002 10:09:02 -0700 (PDT) Date: Wed, 17 Jul 2002 10:09:02 -0700 (PDT) From: Stephan Szabo To: "Rajesh Kumar Mallah." Cc: Subject: Re: Cascading deletions does not seem to work inside PL/PGSQL In-Reply-To: <200207171242.25885.mallah@trade-india.com> Message-ID: <20020717100747.Y60505-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200207/268 X-Sequence-Number: 8646 On Wed, 17 Jul 2002, Rajesh Kumar Mallah. wrote: > On Tuesday 16 July 2002 21:41, you wrote: > > On Tue, 16 Jul 2002, Rajesh Kumar Mallah. wrote: > > > Hi folks, > > > > > > This problem has been troubling me for quite sometime and > > > I would be very thankful for your help. > > > > > > I have included the complete commented script to recreate the problem in > > > question. > > > > > > The problem is inside a plpgsql function i do not see the records in the > > > slave tables getting deleted when i delete the corresponing referenced > > > record from the master table. > > > > > > But things as expected inside a Transaction at the PSQL prompt. > > > > > It should get deleted, but it won't be deleted until the end of the > > user's sql statement (ie, not until after the function has finished). > > Hi thanks for the reply, > > Is it a bug? or is it expected , Well, we're not 100% sure it's correct, but it's the expected behavior unless someone can point to something in SQL99 to make us change it. :) > what if i do not want to fire sperate delete SQLs for the slave > tables ? I'm not sure what you mean by this.