Re: declarations of range-vs-element <@ and @>

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: declarations of range-vs-element <@ and @>
Date: 2011-11-17 18:18:47
Message-ID: 1321553927.11794.17.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2011-11-16 at 16:41 -0500, Tom Lane wrote:
> But what surprises me about this example is that I'd have expected the
> heuristic "assume the unknown is of the same type as the other input"
> to resolve it. Looking more closely, I see that we apply that heuristic
> in such a way that it works only for exact operator matches, not for
> matches requiring coercion (including polymorphic-type matches). This
> seems a bit weird. I propose adding a step to func_select_candidate
> that tries to resolve things that way, ie, if all the known-type inputs
> have the same type, then try assuming that the unknown-type ones are of
> that type, and see if that leads to a unique match. There actually is a
> comment in there that claims we do that, but the code it's attached to
> is really doing something else that involves preferred types within
> type categories...
>
> Thoughts?

That sounds reasonable to me.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-11-17 19:25:03 Re: Refactoring on DROP/ALTER SET SCHEMA/ALTER RENAME TO statement
Previous Message Jeff Davis 2011-11-17 18:02:24 Re: Are range_before and range_after commutator operators?