Re: Allowing extensions to supply operator-/function-specific info - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Allowing extensions to supply operator-/function-specific info
Date
Msg-id CANP8+jLMj6xwZ_1kBXD_CAfMKPo1Hvo=HvEgqbg+va6k5DGoCQ@mail.gmail.com
Whole thread Raw
In response to Re: Allowing extensions to supply operator-/function-specific info  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allowing extensions to supply operator-/function-specific info  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, 27 Jan 2019 at 19:17, Tom Lane <tgl@sss.pgh.pa.us> wrote:
 
> * Allow a normal term to match a functional index, e.g. WHERE x =
> 'abcdefgh' => WHERE substr(x, 1 , 5) = 'abcde' AND x = 'abcdefgh'

I'm a bit confused about what you think this example means.  I do
intend to work on letting extensions define rules for extracting
index clauses from function calls, because that's the requirement
that PostGIS is after in the thread that started this.  I don't
know whether that would satisfy your concern, because I'm not clear
on what your concern is.

To be able to extract indexable clauses where none existed before.

Hash functions assume that x = N => hash(x) = hash(N) AND x = N
so I want to be able to assume 
x = K => f(x) = f(K) AND x = K
for specific f()
to allow indexable operations when we have an index on f(x) only 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: ATTACH/DETACH PARTITION CONCURRENTLY
Next
From: "Takashi Menjo"
Date:
Subject: Re: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory