[postgis-users] subqueries in update?
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Fri Apr 13 01:12:42 PDT 2007
On Fri, 2007-04-13 at 12:19 +0200, Marc Weber wrote:
> Beeing a total noob I wonder wether I can use suqueries such like
> update haueser set inside=contains(geomunion( (SELECT the_geom from shape) ),the_geom);
>
> to set a property of each row indicating that the polygon is inside the union of all polygons of table shape.
>
> Reading posgres documentation I only could find subqieries in the Where or
> SELECT ... part of a query.
>
> If not how would you accomplish this task?
>
> Marc
Hi Marc,
Sure you can. Your version above won't use any spatial indexes (and so
may run quite slowly with a lot of records) but it should work.
Kind regards,
Mark.
More information about the postgis-users
mailing list