Problem Deleting Referenced records - Mailing list pgsql-general

From Alex
Subject Problem Deleting Referenced records
Date
Msg-id 3FAF2294.6060104@meerkatsoft.com
Whole thread Raw
Responses Re: Problem Deleting Referenced records  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Hi,
I have two tables , A and B where table B has a foreign key constraint
to table A.

I want to delete all records in table A that are older than a certain
date that are not referenced by table B.

When I use a DELETE FROM the entire transaction fails as soon as a
referential integrity violation is detected.

Is that the normal behavior? Is there a way to allow the deletion to
complete but skipping all those records that are referenced ?

Thanks in advance for any help.

Alex



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Tables spanning db's in cluster
Next
From: Bruno Wolff III
Date:
Subject: Re: Problem Deleting Referenced records