Search Postgresql Archives

Re: Is it possible to have a cascade upwards query?

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

 



On Wed, Mar 27, 2019 at 8:58 AM Mike Martin <redtux1@xxxxxxxxx> wrote:
Scenario being two tables with a linking pair of fields, where one table is a superset of the other and key is generated by the second table

I would like to have the record in table two deleted when I delete the record in table 1

Since table 1 is a superset of table 2 there is no foreign key possible on which the system provided ON DELETE CASCADE could be specified.  You will need to create your own trigger to perform the deletion on table 2.

David J.

[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