From: Leif B. Kristensen <leif@solumslekt.org>
To: pgsql-sql@postgresql.org
Subject: Re: FOREIGN KEYs ... I think ...
Date: Thu, 5 Jan 2006 12:39:20 +0100
Message-ID: <200601051239.20898.leif@solumslekt.org> (raw)
In-Reply-To: <60352.66.190.208.241.1136433513.squirrel@www.hardgeus.com>
References: <20060104213210.A1088@ganymede.hub.org>
<60352.66.190.208.241.1136433513.squirrel@www.hardgeus.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: leif@solumslekt.org
Subject: Re: FOREIGN KEYs ... I think ...
In-Reply-To: <200601051239.20898.leif@solumslekt.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox