Search Postgresql Archives

Re: R-Trees in PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 2, 2009 at 4:41 PM, Jeff Davis <pgsql@xxxxxxxxxxx> 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
> btree_gist (a contrib module) to be able to use numeric columns as part
> of a GiST index.

It sounds like what you're trying to do needs an "expression index" so
you can construct a data type which does support gist indexes out of
your two numeric columns. You could do something like create index i
on (point(col1,col2)) though I think you might have to actually make a
"box" instead. Alternatively you could look at the "cube" contrib
module. As far as i know all of these actually work with doubles
though, so you'll lose precision.

-- 
greg

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux