<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><BR>I want to create a trigger that updates lines' geometry depending on the position of 2 points (from_node &amp; to_node). If i move&nbsp; 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.<BR>
&nbsp;<BR>
CREATE OR REPLACE FUNCTION update_links() RETURNS "trigger"<BR>&nbsp;&nbsp;&nbsp; AS <BR>'<BR>DECLARE<BR>starts character varying;<BR>ends character varying;<BR>BEGIN<BR>starts = NEW.name WHERE nodes.name = links.from_node;<BR>ends = NEW.name WHERE nodes.name = links.to_node;<BR>UPDATE links SET the_geom = GeometryFromtext(starts.<FONT face="">the_geom</FONT>,ends.the_geom) ;<BR>RETURN NEW;<BR>END'<BR>&nbsp;&nbsp;&nbsp; LANGUAGE plpgsql;<BR>
CREATE TRIGGER update_links_update<BR>&nbsp; AFTER UPDATE<BR>&nbsp; ON nodes<BR>&nbsp; FOR EACH ROW<BR>&nbsp; EXECUTE PROCEDURE update_links();<BR>
&nbsp;<BR>
&nbsp;<BR>
Thanks for your help<BR>
Broun Emmanuel<BR><br /><hr />Live Earth is coming.  Learn more about the hottest summer event - only on MSN. <a href='http://liveearth.msn.com?source=msntaglineliveearthwlm' target='_new'>Check it out!</a></body>
</html>