Re: deleting referenced data

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: deleting referenced data
Date: 2003-08-26 17:34:04
Message-ID: 200308261834.04291.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2003-08-26 17:44:05 Re: Linux ready for high-volume databases?
Previous Message scott.marlowe 2003-08-26 17:30:55 Re: Linux ready for high-volume databases?