> * 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