[postgis-users] Problem updating geometry in a record

Bistrais, Bob Bob.Bistrais at maine.gov
Mon Sep 28 13:46:30 PDT 2015


I have been able to derive a geometry from a query.  I want to insert that geometry into a Multilinestring field.  I have some SQL code to do it.  When I run the code, the output say that the query was successful.  But I don't see the geometry inserted into the table.  Here is the code:

update highschools_aroo set routegeom =
(SELECT ST_Union(geom) as mygeom from (SELECT pt.geom
                FROM pgr_dijkstra(
                                'SELECT gid AS id,
                                                sourceroute::integer as source,
                                                targetroute::integer as target,
                                                (feet / 5280)::double precision AS cost,
                                                feet::double precision as reverse_cost
                                                FROM ngrdsaroo2',2465,1713,false,true)
                                                as di
                                                JOIN ngrdsaroo2 pt on di.id2 = pt.gid) as foo)
                                                WHERE source_node = 2465 and target_node = 1713;

-As mentioned, this runs with no errors, but the geometry field is not updated.  Any suggestions?

Thanks,
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150928/75b1d083/attachment.html>


More information about the postgis-users mailing list