What is wrong in my function, it doesnt stop or should it take so loooong... ? 
Minutes... Trying to insert to lines in table

CREATE OR REPLACE FUNCTION make_point() RETURNS TRIGGER AS $start_point$
    BEGIN
    
      UPDATE positionreports SET the_geom = SetSRID(st_makepoint 
    ("longitude","latitude"), 4326);

        RETURN NULL; -- result is ignored since this is an AFTER trigger
    END;
$start_point$ LANGUAGE plpgsql;

CREATE TRIGGER start_point
AFTER INSERT OR UPDATE ON positionreports
    FOR EACH ROW EXECUTE PROCEDURE make_point();

From: [email protected]
To: [email protected]
Date: Mon, 7 Sep 2009 12:59:56 +0300
Subject: [postgis-users] Points and lines








Hi,

I have this kind of problem that i have 2 tables, another has point data and 
another has line data that comes from points. Everything is okay, i see lines 
etc.
Now I need trigger or function or ... cause everytime that new point comes to 
table i need to update my lines table also that table shows the latest point in 
line also.
I hope that you understand what i mean :)
Tell me different kind of options that I have that I can make this work...
Thanks for everybody !!

-Tuomas

Uusi Spaces ja 25 Gt ilmaista SkyDrive tallennustilaa. Lataa Live paketti.
_________________________________________________________________
Windows Liven avulla voit jakaa valokuviasi helposti.
http://www.download.live.com/
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to