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

From Christopher Kings-Lynne
Subject Re: Foreign keys for non-default datatypes
Date
Msg-id 43FE6838.4070105@familyhealth.com.au
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
List pgsql-hackers
> No, there's no need for that.  It means that the RI stuff would have to
> take whatever steps we agree on to determine the exact comparison
> operator to use, and then be sure to emit SQL that will select exactly
> that operator --- this involves using the OPERATOR(foo.=) syntax to
> remove schema-ambiguity and possibly adding explicit type coercions of
> the operands.  This'll make the RI queries noticeably uglier, but
> they're not meant to be read by humans anyway.  I think it wouldn't be
> any slower, because OPERATOR() syntax will suppress a search-path
> search that the parser would otherwise make for the operator --- but
> in any case, since the plan result is cached, a few microseconds here or
> there won't matter.

Incidentally, shouldn't the existing RI queries (eg. SELECT ... FOR 
SHARE) explicity specify operator(pg_catalog.=)?  Or are they safe from 
that for some other reason?

Chris



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: suggestion
Next
From: Michael Glaesemann
Date:
Subject: Re: suggestion