I want to implement knn for spgist. I dont have question with knn, but have questions with implementation of interface.
i modify pg_am.h (set amcanorderbyop  to true in spgist index).Also i modify pg_amop.h(add
DATA(insert (    4015   600 600 15 o 517 4000 1970 ));
explain SELECT * FROM quad_point_tbl ORDER BY p <-> '-2,50'
 Sort  (cost=1219.31..1246.82 rows=11003 width=16)
   Sort Key: ((p <-> '(-2,50)'::point))
   ->  Index Only Scan using sp_quad_ind on quad_point_tbl  (cost=0.15..480.70 r
ows=11003 width=16)
what am I doing wrong?
In a gist index we have :
regression=# explain SELECT * FROM point_tbl ORDER BY f1 <-> '-3,0';
                                 QUERY PLAN                                
 Index Scan using gpointind on point_tbl  (cost=0.13..8.27 rows=7 width=16)
   Order By: (f1 <-> '(-3,0)'::point)
 Planning time: 0.166 ms
(3 rows)
Are there documents about modification access methods?
Constantine Kuznetsov

Reply via email to