pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedlist number of entries to be delete in cascading deletes
3+ messages / 2 participants
[nested] [flat]
* list number of entries to be delete in cascading deletes
@ 2014-02-11 20:54 Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
2014-02-11 20:58 ` Re: list number of entries to be delete in cascading deletes Claudio Freire <klaussfreire@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Eildert Groeneveld @ 2014-02-11 20:54 UTC (permalink / raw)
To: pgsql-performance
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.
Is there someone who has heard about this problem?
greetings
Eildert
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: list number of entries to be delete in cascading deletes
2014-02-11 20:54 list number of entries to be delete in cascading deletes Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
@ 2014-02-11 20:58 ` Claudio Freire <klaussfreire@gmail.com>
2014-02-12 10:42 ` Re: list number of entries to be delete in cascading deletes Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
0 siblings, 1 reply; 3+ messages in thread
From: Claudio Freire @ 2014-02-11 20:58 UTC (permalink / raw)
To: eildert.groeneveld@fli.bund.de; +Cc: pgsql-performance
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.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: list number of entries to be delete in cascading deletes
2014-02-11 20:54 list number of entries to be delete in cascading deletes Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
2014-02-11 20:58 ` Re: list number of entries to be delete in cascading deletes Claudio Freire <klaussfreire@gmail.com>
@ 2014-02-12 10:42 ` Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
0 siblings, 0 replies; 3+ messages in thread
From: Eildert Groeneveld @ 2014-02-12 10:42 UTC (permalink / raw)
To: Claudio Freire <klaussfreire@gmail.com>; +Cc: 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
==================================================
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2014-02-12 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 20:54 list number of entries to be delete in cascading deletes Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
2014-02-11 20:58 ` Claudio Freire <klaussfreire@gmail.com>
2014-02-12 10:42 ` Eildert Groeneveld <eildert.groeneveld@fli.bund.de>
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