Re: FOREIGN KEYs ... I think ... - Mailing list pgsql-sql

From Leif B. Kristensen
Subject Re: FOREIGN KEYs ... I think ...
Date
Msg-id 200601051239.20898.leif@solumslekt.org
Whole thread Raw
In response to Re: FOREIGN KEYs ... I think ...  (nospam@hardgeus.com)
List pgsql-sql
On Thursday 05 January 2006 04:58, nospam@hardgeus.com wrote:
>That's not what foreign keys do.  The only thing a foreign key
> provides is a guarantee that if any records in B (the referencing
> table) still reference a record in table A (the referenced table)
> then you cannot delete that referenced record.

Just a little nitpick: A foreign key will also guarantee that you can't 
insert or update records with an fk in the referencing table that 
doesn't match one already entered into the referenced table.
-- 
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: JOIN question with multiple records
Next
From: "Marc G. Fournier"
Date:
Subject: Re: FOREIGN KEYs ... I think ...