Re: Proposed feature: Selective Foreign Keys

From: Tom Dunstan <pgsql(at)tomd(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed feature: Selective Foreign Keys
Date: 2013-12-04 23:19:54
Message-ID: 8CC88EC5-3598-4DAC-A7E9-B458DBBD63E9@tomd.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 5 Dec 2013, at 06:10, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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 right where 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Dunstan 2013-12-04 23:26:42 Re: Proposed feature: Selective Foreign Keys
Previous Message Peter Eisentraut 2013-12-04 22:26:23 Re: Extension Templates S03E11