[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Postgres method / expression help to delete related r
From: |
Jim Busser |
Subject: |
Re: [Gnumed-devel] Postgres method / expression help to delete related records |
Date: |
Thu, 01 Sep 2011 23:39:30 -0700 |
On 2011-09-01, at 11:30 PM, Jim Busser wrote:
> So I thought "well then, let me keep the vaccines"
>
> gnumed_v16=> delete from ref.branded_drug where not preparation =
> 'vaccine' ;
>
> and I got
>
> ERROR: update or delete on table "branded_drug" violates foreign
> key constraint "lnk_substance2brand_fk_brand_fkey" on table
> "lnk_substance2brand"
> DETAIL: Key (pk)=(1) is still referenced from table
> "lnk_substance2brand".
is the above explained by lack (in the table properties) of
ON DELETE CASCADE
??
-- Jim