I've got it!!!<br><br clear="all">create table wp_obs as select nextval('wp_seq3') as dummy, geom from (select Pointn(exteriorring(obstacles.geom), generate_series(1,npoints(obstacles.geom)-1)) as geom from obstacles, place where
obstacles.geom && place.geometry and intersects(place.geometry,obstacles.geom) order by distance (Pointn(exteriorring(obstacles.geom), generate_series(1,npoints(obstacles.geom)-1)),GeomFromText('POINT(3.2 -35.9
)',-1))) an;<br><br>I think this is the largest query I made in postgres. Thank you Regina, you inspired me with your "subqueries method", you're my muse =)<br>-- <br>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<br>Manuel <br> <br><a href="mailto:manuelfgm@gmail.com">manuelfgm@gmail.com</a> <br><a href="http://manuelfgm.blogspot.com">
http://manuelfgm.blogspot.com</a> <br>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::