pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: list number of entries to be delete in cascading deletes
Date: Wed, 12 Feb 2014 11:42:55 +0100
Message-ID: <1392201775.20643.6.camel@localhost> (raw)
In-Reply-To: <CAGTBQpa-hSszXGgN8pQk2SzAE6X9p-_rDrmg_WwSNa7M7cJRog@mail.gmail.com>
References: <E1WCttM-0006Np-Nj@malur.postgresql.org>
	<alpine.DEB.2.02.1402102007580.14849@skaj>
	<52F93098.2090002@vmware.com>
	<CAGa5y0MNo7r3HdnZMTa+a+W+d14kbRNO-+REyYSMRd9q_XHw1g@mail.gmail.com>
	<19895.1392133067@sss.pgh.pa.us>
	<1392152044.4823.9.camel@localhost>
	<CAGTBQpa-hSszXGgN8pQk2SzAE6X9p-_rDrmg_WwSNa7M7cJRog@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On Di, 2014-02-11 at 18:58 -0200, Claudio Freire wrote:
> On Tue, Feb 11, 2014 at 5:54 PM, Eildert Groeneveld
> <eildert.groeneveld@fli.bund.de> wrote:
> > Dear All
> >
> > this probably not the best list to post this question:
> >
> > I use cascading deletes but would like to first inform the user what she
> > is about to do.
> > Something like : explain delete from PANEL where panel_id=21;
> > -- you are about to delete 32144 records in tables abc aaa wewew
> >
> > This is clearly something that can be programmed but as all information
> > is available in the database schema, there should be a generalized
> > procedure available.
> 
> Granted, this is somewhat ugly, but you could issue the delete, note
> down the rowcount, and rollback.
Thanks Claudio, thats an option and a fallback if we do not come up with
a better version. I am sure that there is something around.


> 
> 

-- 
Eildert Groeneveld
===================================================
Institute of Farm Animal Genetics (FLI)
Mariensee 31535 Neustadt Germany
Tel : (+49)(0)5034 871155 Fax : (+49)(0)5034 871143
e-mail: eildert.groeneveld@fli.bund.de 
web:    http://vce.tzv.fal.de
==================================================



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (3+ messages)

Message-ID: <1392201775.20643.6.camel@localhost>
Permalink:  ../1392201775.20643.6.camel@localhost/
Also on:    postgresql.org/message-id/1392201775.20643.6.camel@localhost

 · 

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-performance@postgresql.org
  Cc: eildert.groeneveld@fli.bund.de, klaussfreire@gmail.com
  Subject: Re: list number of entries to be delete in cascading deletes
  In-Reply-To: <1392201775.20643.6.camel@localhost>

* 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