Re: Foreign keys for non-default datatypes - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Foreign keys for non-default datatypes
Date
Msg-id 20060303162519.G2154@megazone.bigpanda.com
Whole thread Raw
In response to Re: Foreign keys for non-default datatypes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Foreign keys for non-default datatypes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 3 Mar 2006, Tom Lane wrote:

> BTW, I had another thought about this: if we go this way, then the plans
> associated with RI check queries would essentially always be trivial
> index lookups (for everything except RI_Initial_Check).  It'd be within
> the realm of feasibility to throw away the current cached-plan RI
> infrastructure and simply do direct indexscans, in the style that we
> currently use for most system-catalog accesses.

Would we have to do anything odd if we want to be testing only some of the
index columns and possibly not in the index order (like match partial
where some of the fk side is null)?  I don't honestly see us doing match
partial any time soon, but I'd like to have an idea of what'd be involved.

> If we did this then RI checks would no longer be subvertible by rules or
> user triggers.

I don't think that it'd really help because it's the actions that are
generally subvertible not the checks and since those are looking at the
potentially not indexed fk side, I don't think the above would apply.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Foreign keys for non-default datatypes
Next
From: Tom Lane
Date:
Subject: Re: Foreign keys for non-default datatypes