I want to create a trigger that updates lines' geometry depending on the 
position of 2 points (from_node & to_node). If i move  a point connecting two 
or more lines, the ends of lines should also move and follow the point. I wrote 
the following trigger but it gives me error that am giving multiple geometry.
 
CREATE OR REPLACE FUNCTION update_links() RETURNS "trigger"    AS 
'DECLAREstarts character varying;ends character varying;BEGINstarts = NEW.name 
WHERE nodes.name = links.from_node;ends = NEW.name WHERE nodes.name = 
links.to_node;UPDATE links SET the_geom = 
GeometryFromtext(starts.the_geom,ends.the_geom) ;RETURN NEW;END'    LANGUAGE 
plpgsql;
CREATE TRIGGER update_links_update  AFTER UPDATE  ON nodes  FOR EACH ROW  
EXECUTE PROCEDURE update_links();
 
 
Thanks for your help
Broun Emmanuel
_________________________________________________________________
Play free games, earn tickets, get cool prizes! Join Live Search Club. 
http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to