On Wed, 25 Nov 2009, Tom Lane wrote:

Oleg Bartunov <o...@sai.msu.su> writes:
I tried to force query to use index by specifying high execution cost, but
without success, even seqscan cost doesn't changed. This is 8.4.1

I think you altered the wrong function.  The function underlying
point <@ box is on_pb() not pt_contained_box ... in fact, I don't
even see a function named that.

sorry, I forgot to say, that I created operator

CREATE OR REPLACE FUNCTION pt_contained_box(point, box)
        RETURNS bool
        AS 'MODULE_PATHNAME'
        LANGUAGE 'C'
        IMMUTABLE RETURNS NULL ON NULL INPUT;

CREATE OPERATOR <@ (
        LEFTARG = point,
        RIGHTARG = box,
        PROCEDURE = pt_contained_box,
        COMMUTATOR = '@>',
        RESTRICT = contsel,
        JOIN = contjoinsel
);


        Regards,
                Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: o...@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to