Syntax for use of point

From: Poul Møller Hansen <freebsd(at)pbnet(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Syntax for use of point
Date: 2005-10-05 16:46:16
Message-ID: 43440358.4080304@pbnet.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have made the table shown below and inserted two points,
but I can't find the proper syntax for finding the nearest point

create table store_point(position point);
insert into store_point values ('55.512345, -6.55555');
insert into store_point values ('55.123456, -6.11111');
select * from store_point;
position
----------------------
(55.512345,-6.55555)
(55.123456,-6.11111)

I suppose that I should use the ## operator,
but how does it work when I want to find the nearest
row for the points (55.4,-6.4) ?

Thanks,
Poul

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard_D_Levine 2005-10-05 16:53:36 PostgreSQL on Slash Dot
Previous Message Welty, Richard 2005-10-05 16:38:00 Re: Securing Postgres