Re: deleting referenced data - Mailing list pgsql-general

From Richard Huxton
Subject Re: deleting referenced data
Date
Msg-id 200308261834.04291.dev@archonet.com
Whole thread Raw
In response to deleting referenced data  (Andreas Fromm <Andreas.Fromm@physik.uni-erlangen.de>)
Responses Re: deleting referenced data  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
On Tuesday 26 August 2003 15:06, Andreas Fromm wrote:
>
> When I delete a record of the table realtions I also want to delete the
> record on the data-tables if there is no other record referencing them.
> How can I do this?

You want to add "ON DELETE CASCADE" to the REFERENCES... clause.
See the SQL reference for full syntax details.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Linux ready for high-volume databases?
Next
From: Greg Stark
Date:
Subject: Re: Linux ready for high-volume databases?