Skip site navigation (1) Skip section navigation (2)

Function which gives back the nearest neighbours of a requested value

From: "Virgile Beddok" <virgile(dot)beddok(at)igd(dot)fraunhofer(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Cc: pgsql-advocacy(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Function which gives back the nearest neighbours of a requested value
Date: 2005-03-25 18:36:16
Message-ID: 2657.146.140.8.144.1111775776.squirrel@webmail.igd.fraunhofer.de (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-advocacypgsql-novice
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

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2005-03-25 19:45:01
Subject: Re: outputting everything from psql to a file
Previous:From: Walker, Jed SDate: 2005-03-25 17:39:02
Subject: outputting everything from psql to a file

pgsql-admin by date

Next:From: Subbiah, StalinDate: 2005-03-25 19:12:37
Subject: 64 or 32 postgres
Previous:From: Lee WuDate: 2005-03-25 17:58:24
Subject: Re: explain analyze of PG server level

pgsql-advocacy by date

Next:From: Christopher Kings-LynneDate: 2005-03-27 05:24:34
Subject: Re: [pgsql-advocacy] Function which gives back the nearest neighbours
Previous:From: Guy FlahertyDate: 2005-03-24 03:59:51
Subject: postgresQL.org "Latest News" or "Latest Product"?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group