On 5 Dec 2013, at 03:48, Andrew Dunstan <andrew@dunslane.net> wrote:
>>> Well I guess we could say something like:
>>>
>>> FOREIGN KEY (a-col) WHERE (a-condition) REFERENCES b(b-col) WHERE
>>> (b-condition)
>>>
>
> OK, those make sense. I wonder whether this should be done via a USING clause on the constraint that pointed to the
partialunique index. Or would that be too obscure?
Well you could put a USING clause on the end and it would read pretty unambiguously. Requiring that the user specify it
ratherthan trying to guess which index to use would also probably be an easier path to getting that feature in, at
leastfor a first cut.
I won’t be doing work towards putting a where clause on the referenced side just yet, though. One thing at a time.
Cheers
Tom