Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...
Date
Msg-id 20873.948124695@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Foreign keys: unexpected result from ALTER TABLE... ADD CONSTRAINT...  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
"Oliver Elphick" <olly@lfix.co.uk> writes:
> I guess I will have to remove the restriction that products listed in
> product_suppliers must be purchased; it may indeed become possible for the
> to change status from time to time, so that is not too unsatisfactory.

You could possibly enforce dependencies like that by using a trigger
function, instead of foreign-key stuff.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [HACKERS] pg_dump not in very good shape
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] RE: Getting rid of setheapoverride (was Re: [COMMITTERS] heap.c)