X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B73C2475CB1 for ; Thu, 20 Feb 2003 12:07:58 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 39054-08 for ; Thu, 20 Feb 2003 12:07:46 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id D2499475B8E for ; Thu, 20 Feb 2003 12:06:25 -0500 (EST) Received: from klaster.net (pq153.krakow.cvx.ppp.tpnet.pl [213.76.41.153]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id C35A42B88D; Thu, 20 Feb 2003 17:57:03 +0100 (CET) Message-ID: <3E550AF6.6060203@klaster.net> Date: Thu, 20 Feb 2003 18:05:58 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Scott Ding Cc: pgsql-sql@postgresql.org Subject: Re: point <-> polygon not supported? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/459 X-Sequence-Number: 11857 Scott Ding wrote: > Tomasz, > > Thanks for the tip. What I want to do is something like the following: > > Select * from table where (table.geom <-> polygon('((3,3), (3,4), (4,5), > (5,4), (5,3))')) < 1.0); > > Table.geom is a point column. I have never user geometric types... I think, you can use some data type, which can be used for counting distance, for example circle: Select * from table where (circle(table.geom,0) <-> polygon('((3,3), (3,4), (4,5), (5,4), (5,3))')) < 1.0); Regards, Tomasz Myrta