Sorry the error i get is:
Query failed: ERROR: missing FROM-clause entry for table "nodes" ....
Broun Uganda
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Trigger updata linesDate: Tue, 14
Aug 2007 23:24:44 +0300
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
Live Earth is coming. Learn more about the hottest summer event - only on MSN.
Check it out!
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users