Search Postgresql Archives

Re: count on cascading deletes

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

 



Eildert Groeneveld <eildert.groeneveld@xxxxxxxxxxx> wrote:

> prior to issuing a cascading delete in an interactive program
> I would like to retrieve from Postgresql what is involved in the
> particular delete, so that this can be printed to the console
> and the user can be asked:
>
>   This is what your delete would do in the database:
>   deleting panel = 123 would imply deleting the following children:
>                   in foo: 123    records
>                   in fuu: 123456 records
>
>   do you really want to do this? (y/N)
>
> As this is a general problem, I would assume, that someone has written
> a function that would do that. Unfortunately, no luck with google.

Do you want to block anyone who attempts to modify data such that
the counts might become different, for an indefinite amount of time
waiting for a response to this question?  Or would you rather that
the actual delete when they say Y potentially do something very
different from what the prompt is asking?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux