Re: Foreign Key Implementation - Mailing list pgsql-sql

From Mathijs Brands
Subject Re: Foreign Key Implementation
Date
Msg-id 20000405030433.A6413@ilse.nl
Whole thread Raw
In response to Foreign Key Implementation  ("Drozdowski, Catharine I" <Drozdowski.Catharine@emeryworld.com>)
Responses Re: Foreign Key Implementation  (Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Drozdowski, Catharine I"
Date:
Subject: Foreign Key Implementation
Next
From: Daniel Spratlen
Date:
Subject: postgresql 7.0