Function which gives back the nearest neighbours of a requested value - Mailing list pgsql-admin

From Virgile Beddok
Subject Function which gives back the nearest neighbours of a requested value
Date
Msg-id 2657.146.140.8.144.1111775776.squirrel@webmail.igd.fraunhofer.de
Whole thread Raw
Responses Re: [pgsql-advocacy] Function which gives back the nearest neighbours  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-admin
Hi!

I'm looking for an existing function which allows me to search the nearest
neighbours of the requested value.

A simple example: if I search the value "2", and my table doesn't contain
it, but only contains "0" and "10", as "nearest neighbours", then it will
give me back these values : "0" and "10".
Could you please tell me if such function already exists in Postgresql,
for  one-dimensional objects, and also for multi-dimensional objects.

Thanks a lot in advance.
Virgile Beddok

pgsql-admin by date:

Previous
From: Rigmor Ukuhe
Date:
Subject: Migrating from 7.2 to 8
Next
From: "Dr. Roger Wießner"
Date:
Subject: PostgreSQL: ´GRANT ALL TO PUBLIC´ ?