Re: [GENERAL] R-Trees in PostgreSQL

2009-11-03 Thread Sam Mason
On Mon, Nov 02, 2009 at 08:10:47PM -0800, Greg Stark wrote: > As far as i know all of these actually work with doubles > though, so you'll lose precision. IEEE 754 floating point numbers (i.e. float8 or "double precision" in PG) are defined to have a 52 bit significand and hence can store integer

Re: [GENERAL] R-Trees in PostgreSQL

2009-11-02 Thread Greg Stark
On Mon, Nov 2, 2009 at 4:41 PM, Jeff Davis wrote: > On Tue, 2009-11-03 at 00:25 +0100, Viktor Rosenfeld wrote: >> I'd like to know what kind of functions I have to implement for a R-Tree >> index on numeric columns, > > NUMERIC is scalar, so an R-Tree doesn't make much sense. You can install > btr

Re: [GENERAL] R-Trees in PostgreSQL

2009-11-02 Thread Paul Ramsey
Also for one-dimensional ranges, consider contrib/seg P. On Mon, Nov 2, 2009 at 4:41 PM, Jeff Davis wrote: > On Tue, 2009-11-03 at 00:25 +0100, Viktor Rosenfeld wrote: >> I'd like to know what kind of functions I have to implement for a R-Tree >> index on numeric columns, > > NUMERIC is scalar,

Re: [GENERAL] R-Trees in PostgreSQL

2009-11-02 Thread Jeff Davis
On Tue, 2009-11-03 at 00:25 +0100, Viktor Rosenfeld wrote: > I'd like to know what kind of functions I have to implement for a R-Tree > index on numeric columns, NUMERIC is scalar, so an R-Tree doesn't make much sense. You can install btree_gist (a contrib module) to be able to use numeric column

[GENERAL] R-Trees in PostgreSQL

2009-11-02 Thread Viktor Rosenfeld
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