pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cascading deletions does not seem to work inside PL/PGSQL functions.
Date: Thu, 18 Jul 2002 12:09:48 +0530
Message-ID: <200207181209.48774.mallah@trade-india.com> (raw)
In-Reply-To: <20020717232631.Y68417-100000@megazone23.bigpanda.com>
References: <20020717232631.Y68417-100000@megazone23.bigpanda.com>


Thanks for your reply. Stephan.

On Thursday 18 July 2002 12:01, you wrote:
> On Thu, 18 Jul 2002, Rajesh Kumar Mallah. wrote:
> >  > what if i do not want to fire sperate delete SQLs for the slave
> >  >
> > > > tables ?
> >
> > Hi ,
> >
> > what is mean is that I a have many tables(x,y,z...)  which reference the
> > master table (M).
> >
> > I want that the records from the tables (x,y,z ect) automatically get
> > deleted in the function when i delete the recored in the master (M). so
> > that i do not have to explicitly delete from each of the tables x,y,z,
> > etc.
> >
> > actually i want to reinsert the records in the table x,y,z as well as M
> > with some modification.
>
> So you want to do something like:
> delete from M
> ...
> Insert into M,x,y,...
>
> inside the function with the x,y, etc rows
> going away between those two?
>
> Hmm, yeah, that's a case that I don't think you can
> do currently using the on delete cascade and would
> require separate deletes. It'd make sense that you should
> be able to do that, however... It doesn't really work with
> how they're implemented currently, so it'd certainly be
> a while before it'd change in any case.

-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.





view thread (6+ messages)

Message-ID: <200207181209.48774.mallah@trade-india.com>
Permalink:  ../200207181209.48774.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200207181209.48774.mallah@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com, sszabo@megazone23.bigpanda.com
  Subject: Re: Cascading deletions does not seem to work inside PL/PGSQL functions.
  In-Reply-To: <200207181209.48774.mallah@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox