R-Trees in PostgreSQL - Mailing list pgsql-general

From Viktor Rosenfeld
Subject R-Trees in PostgreSQL
Date
Msg-id 20091102232504.GA35438@stan
Whole thread Raw
Responses Re: R-Trees in PostgreSQL  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Help with postgresql memory issue
Next
From: Jeff Davis
Date:
Subject: Re: R-Trees in PostgreSQL