[postgis-devel] Why n-D indexes (based on GIDX) only support the &&& operator ?

Esteban Zimanyi ezimanyi at ulb.ac.be
Sat Jul 14 02:17:38 PDT 2018


I always wondered why the n-D indexes (based on GIDX) only support the &&&
operator, the three other operators are commented out in the SQL file

-- Availability: 2.0.0
CREATE OPERATOR CLASS gist_geometry_ops_nd
FOR TYPE geometry USING GIST AS
STORAGE  gidx,
OPERATOR        3        &&& ,
-- OPERATOR        6        ~= ,
-- OPERATOR        7        ~ ,
-- OPERATOR        8        @ ,
-- Availability: 2.2.0
OPERATOR        13       <<->> FOR ORDER BY pg_catalog.float_ops,
        [...]

However, in the C code all operations are defined ! For example,

static inline bool gserialized_gist_consistent_leaf(GIDX *key, GIDX *query,
StrategyNumber strategy)
{
bool retval;

POSTGIS_DEBUGF(4, "[GIST] leaf consistent, strategy [%d], count[%i]",
               strategy, geog_counter_leaf++);

switch (strategy)
{
case RTOverlapStrategyNumber:
retval = (bool) gidx_overlaps(key, query);
break;
case RTSameStrategyNumber:
retval = (bool) gidx_equals(key, query);
break;
case RTContainsStrategyNumber:
case RTOldContainsStrategyNumber:
retval = (bool) gidx_contains(key, query);
break;
case RTContainedByStrategyNumber:
case RTOldContainedByStrategyNumber:
retval = (bool) gidx_contains(query, key);
break;
default:
retval = false;
}

return (retval);
}

Is the reason for this to cope with the missing dimensions as suggested
here ?
https://lists.osgeo.org/pipermail/postgis-devel/2015-February/024757.html

Any hint in this respect?

Regards

Esteban

-- 
------------------------------------------------------------
Prof. Esteban Zimanyi
Department of Computer & Decision Engineering  (CoDE) CP 165/15
Universite Libre de Bruxelles
Avenue F. D. Roosevelt 50
B-1050 Brussels, Belgium
fax: + 32.2.650.47.13
tel: + 32.2.650.31.85
e-mail: ezimanyi at ulb.ac.be
Internet: http://code.ulb.ac.be/
------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180714/2e82e4c0/attachment-0001.html>


More information about the postgis-devel mailing list