| From: | "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: FOREIGN KEYs ... I think ... |
| Date: | 2006-01-05 11:39:20 |
| Message-ID: | 200601051239.20898.leif@solumslekt.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Thursday 05 January 2006 04:58, nospam(at)hardgeus(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marc G. Fournier | 2006-01-06 01:23:18 | Re: FOREIGN KEYs ... I think ... |
| Previous Message | Richard Huxton | 2006-01-05 08:40:56 | Re: JOIN question with multiple records |