Search Postgresql Archives

Re: PostgreSQL - Ordering Table based of Foreign Key

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

 



On 10/3/21 9:24 AM, FOUTE K. Jaurès wrote:

Please don't top post, inline/bottom posting is the preferred style on this list.

I need to delete data from about 100 table in the production system for a specific client without stopping application.

Honestly that is not that much more informative.

So:

1) Do the FK's have "ON DELETE CASCADE" already?

2) Does a single FK cascade through all 100 tables or are there groups of parent/child tables and associated FK's

3) Show an example DELETE query and tables affected.


On Sun, 3 Oct 2021, 17:19 Adrian Klaver, <adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>> wrote:

    On 10/3/21 7:40 AM, FOUTE K. Jaurès wrote:
     > Thanks for your input but I want to make a delete with where clause

    Then Thomas Kellerer's suggestion of having "ON DELETE CASCADE" on the
    FK would seem to be what you need. If not then you will need to provide
    more information about what you are trying to achieve?


-- Adrian Klaver
    adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux