Re: Help with a foreign key with non-unique reference? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Help with a foreign key with non-unique reference?
Date
Msg-id 20080916101610.Y70889@megazone.bigpanda.com
Whole thread Raw
In response to Help with a foreign key with non-unique reference?  ("Brent Wood" <b.wood@niwa.co.nz>)
List pgsql-general
On Tue, 16 Sep 2008, Brent Wood wrote:

> I need a foreign key (or equivalent) where the referenced table cannot
> have a unique constraint.

Well, do you need a full foreign key or just the insert-time check on the
referencing table? Does the referenced table get updates or deletes that
you want to watch for, and do you want those to error or to do the
equivalent of one of the referential actions?

For the insert-time check only if you don't care about deletes or updates
to the referenced table, a trigger that checks for existance is probably
good enough.

pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: PITR and base + full backups
Next
From: Chris Browne
Date:
Subject: Re: [LIKELY_SPAM]Re: Oracle and Postgresql