[postgis-users] Convert x, y into geometry and update two geometries
Broun Uganda
tekuganda at hotmail.com
Wed Feb 6 03:36:56 PST 2008
When i use the code below, it is executed data is transferred to the database but the geom is not inserted.CREATE OR REPLACE FUNCTION calc_point()
RETURNS "trigger" AS
$BODY$BEGIN
NEW.the_geom:=SetSRID(MakePoint(new.point_x, new.point_y), -1) ;
RETURN NEW;
END$BODY$
LANGUAGE 'plpgsql' VOLATILE;CREATE TRIGGER insert_nodes_geom BEFORE INSERT OR UPDATE ON nodes FOR EACH ROW EXECUTE PROCEDURE calc_point();Broun Uganda
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080206/4d98d69c/attachment.html>
More information about the postgis-users
mailing list