Re: list number of entries to be delete in cascading deletes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 11, 2014 at 5:54 PM, Eildert Groeneveld
<eildert.groeneveld@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux