From: Mathijs Brands <mathijs@ilse.nl>
To: Drozdowski, Catharine I <Drozdowski.Catharine@emeryworld.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Foreign Key Implementation
Date: Wed, 5 Apr 2000 03:04:33 +0200
Message-ID: <20000405030433.A6413@ilse.nl> (raw)
In-Reply-To: <B1F9E0D87882D21182F8006094519AD80455A760@mwabs021.emeryworld.com>
References: <B1F9E0D87882D21182F8006094519AD80455A760@mwabs021.emeryworld.com>
On Tue, Apr 04, 2000 at 11:19:56PM -0000, Drozdowski, Catharine I allegedly wrote:
> Hi All,
> I had my first go at Postgres today. So far so good. But I need to know how
> to implement foreign keys using postgres. I did not find anything in the
> documentation and several searches on "foreign" key produced nothing.
>
> Does Postgres have foreign key functionality. And if not why and when???
I'm no expert on this, but PostgreSQL does have a foreign key implementation,
albeit a somewhat cumbersome IMO. You should look the refint (referential
integrity) stuff in the contrib directory of the sourcetree. Since I don't
have a sourcetree lying around at the moment, I can't verify the exact name
of the directory. The goodies may be located in the SDI (or something similar)
directory. What it boils down to is that you use triggers to enforce referential
integrity. It works just fine, but is a bit labourious to setup.
My 0.02 EU,
Mathijs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mathijs@ilse.nl, Drozdowski.Catharine@emeryworld.com
Subject: Re: Foreign Key Implementation
In-Reply-To: <20000405030433.A6413@ilse.nl>
References: <B1F9E0D87882D21182F8006094519AD80455A760@mwabs021.emeryworld.com> <20000405030433.A6413@ilse.nl>
* 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