Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id B8781475B65 for ; Tue, 16 Jul 2002 12:11:08 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id E888AD600; Tue, 16 Jul 2002 09:11:13 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id DE4515C02; Tue, 16 Jul 2002 09:11:13 -0700 (PDT) Date: Tue, 16 Jul 2002 09:11:13 -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: <200207161655.14794.mallah@trade-india.com> Message-ID: <20020716090915.M50015-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200207/239 X-Sequence-Number: 8617 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).