Re: Index on points - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Index on points
Date
Msg-id 20040608130824.GA1291@wolff.to
Whole thread Raw
In response to Index on points  (Holger Klawitter <lists@klawitter.de>)
Responses Re: Index on points
List pgsql-general
On Tue, Jun 08, 2004 at 14:17:57 +0200,
  Holger Klawitter <lists@klawitter.de> wrote:
>
> Hi there,
>
> which operator class can I use in order to search points by distance like in:
>
> SELECT p FROM tbl WHERE (p <-> point(0,0)) < 10;
>
> - From what I've seen, there is none - which surprises me ...

You want to create a box that includes all points that might match
and use that to do an index search (using an rtree index) and then
check that the distance is really less than whatever.

pgsql-general by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: problem with inserting a generated seq no into not null field
Next
From:
Date:
Subject: Re: [HACKERS] The pgreplication project