possible to DELETE CASCADE? - Mailing list pgsql-general

From Miles Keaton
Subject possible to DELETE CASCADE?
Date
Msg-id 59b2d39b04123011101872498d@mail.gmail.com
Whole thread Raw
Responses Re: possible to DELETE CASCADE?  (Thomas Braad Toft <pgsql-general@magicx.dk>)
Re: possible to DELETE CASCADE?  (Miles Keaton <mileskeaton@gmail.com>)
Re: possible to DELETE CASCADE?  (Robby Russell <robby@planetargon.com>)
Re: possible to DELETE CASCADE?  (Miles Keaton <mileskeaton@gmail.com>)
List pgsql-general
Is it possible for a query to delete a record and all of its
foreign-key dependents?

I see DROP CASCADE, but not a DELETE CASCADE.

What I'm trying to do:
I have a "clients" table.
I have many different tables that use the clients.id as a foreign key.
When I delete a client, I want it to delete all records in those many
different tables that reference this client.

Right now I have my script passing many queries to delete them
individually.  ("delete from history where client_id=?; delete from
payments where client_id=?" -- etc)

Any shortcut way to do this?

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: pg_dump and pgpool
Next
From: Thomas Braad Toft
Date:
Subject: Re: possible to DELETE CASCADE?