Re: list number of entries to be delete in cascading deletes - Mailing list pgsql-performance

From Eildert Groeneveld
Subject Re: list number of entries to be delete in cascading deletes
Date
Msg-id 1392201775.20643.6.camel@localhost
Whole thread Raw
In response to Re: list number of entries to be delete in cascading deletes  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-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
==================================================



pgsql-performance by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: increasing query time after analyze
Next
From: Бородин Владимир
Date:
Subject: Problem with ExclusiveLock on inserts