Hi,
I'd like to create an R-Tree index on two numeric columns. As far as I
know, PostgreSQL supports R-Trees via the GiST index class for some
spatial types (box and the like). When I create a GiST index on two
numeric columns, I get the error message:
ERROR: data type numeric has no default operator class for access
method "gist"
HINT: You must specify an operator class for the index or define a
default operator class for the data type.
I'd like to know what kind of functions I have to implement for a R-Tree
index on numeric columns, particularly if that can be done in PL/PGSQL
or if I have to fall back to C.
Or maybe there already exists a solution? From web searches I gather
that PostgreSQL at one time supported R-Trees natively, but that it was
dropped in favor of GiST. I couldn't find anything in the contrib
directory.
Thanks,
Viktor