Re: Proposed feature: Selective Foreign Keys - Mailing list pgsql-hackers

From Tom Dunstan
Subject Re: Proposed feature: Selective Foreign Keys
Date
Msg-id 8CC88EC5-3598-4DAC-A7E9-B458DBBD63E9@tomd.cc
Whole thread Raw
In response to Re: Proposed feature: Selective Foreign Keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 5 Dec 2013, at 06:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>>>> Well I guess we could say something like:
>>>>
>>>> FOREIGN KEY (a-col) WHERE (a-condition) REFERENCES b(b-col) WHERE
>>>> (b-condition)
>>>>
>
> I like what you have above.

Yeah. Given both the apparent ambiguity of the current placement, and the fact that the current placement would be
rightwhere you’d put a where clause on the referenced table, that’s the only sane way to do it. And it’s not so bad. 

Cheers

Tom


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Extension Templates S03E11
Next
From: Tom Dunstan
Date:
Subject: Re: Proposed feature: Selective Foreign Keys