Re: Allowing extensions to supply operator-/function-specific info

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Allowing extensions to supply operator-/function-specific info
Date: 2019-03-06 05:52:23
Message-ID: 1609.1551851543@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Paul Ramsey <pramsey(at)cleverelephant(dot)ca> writes:
>> On Mar 5, 2019, at 3:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Then you're at least missing adequate tests for the 3-arg functions...
>> 3 args with the index column second will not work as this stands.

> Some of the operators are indifferent to order (&&, overlaps) and others are not (@, within) (~, contains).

Right.

> The 3-arg functions fortunately all have && strategies.

Hm ... that probably explains why it's okay to apply the "expand"
behavior to the non-indexed argument regardless of which one that is.
I imagine the official definition of those functions isn't really
symmetrical about which argument the expansion applies to, though?

> The types on either side of the operators are always the same (geometry && geometry), ST_Intersects(geometry, geometry).
> I could simply be getting a free pass from the simplicity of my setup?

Yeah, seems so. The real reason I'm pestering you about this is that,
since you're the first outside user of the support-function
infrastructure, other people are likely to be looking at your code
to see how to do things. So I'd like your code to not contain
unnecessary dependencies on accidents like that ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-03-06 05:58:20 Re: Tab completion for SKIP_LOCKED option
Previous Message Michael Paquier 2019-03-06 05:46:11 Re: Tab completion for SKIP_LOCKED option