Re: how to use geometric shapes? - Mailing list pgsql-general

From Tom Lane
Subject Re: how to use geometric shapes?
Date
Msg-id 2454.1095138214@sss.pgh.pa.us
Whole thread Raw
In response to how to use geometric shapes?  ("Henriksen, Jonas F" <jonas.f.henriksen@imr.no>)
List pgsql-general
"Henriksen, Jonas F" <jonas.f.henriksen@imr.no> writes:
> select lat, lon from toperation
> where point'(lat,lon)' @ polygon'((50, 0),(70,10),(80,50),(50,80),(50,0))'

I think you're confusing the syntax for point literal constants with the
constructor function that makes a point value from two float8 values.
You probably want something more like

select lat, lon from toperation
where point(lat,lon) @ polygon '((50, 0),(70,10),(80,50),(50,80),(50,0))'

            regards, tom lane

pgsql-general by date:

Previous
From: "Jeffrey W. Baker"
Date:
Subject: psql exit status varies for scripts on STDIN
Next
From: Tom Lane
Date:
Subject: Re: psql exit status varies for scripts on STDIN