Bryan Field-Elliot <bryan_lists@netmeme.org> writes:
> I'm developing a GIS system on PostgreSQL. I need to store a table of
> points (latitude and longitude), and do queries such as "return all
> points enclosed with the given circle ((X,Y),R)".
You might care to look at
http://postgis.refractions.net/postgis-0.5.1.tar.gz
and see if you're not reinventing the wheel.
regards, tom lane