[postgis-users] Points and lines
Tuomas Ruohonen
illurt at hotmail.com
Tue Sep 8 01:53:30 PDT 2009
Hi,
Thanks for the help now it is working correctly.
Is there choice that this can be done faster, i am inserting 170 rows and it is taking like 30 000ms.
Any help for this problem ?
Br.
Tuomas
Date: Tue, 8 Sep 2009 09:53:58 +0200
From: Ralf.Suhr at itc-halle.de
To: postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] Points and lines
You have a endless loop. You can not have a trigger on update,
that do a update on the same table.
Gr Ralf
Von:
postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von Tuomas
Ruohonen
Gesendet: Dienstag, 8. September 2009 07:42
An: postgis-users at postgis.refractions.net
Betreff: Re: [postgis-users] Points and lines
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: illurt at hotmail.com
To: postgis-users at postgis.refractions.net
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.
Uudessa
IE8 selaimessa on uudet pikatoiminnot. Lataa.
_________________________________________________________________
Jaa muistosi verkossa haluamiesi henkilöiden kanssa.
http://www.microsoft.com/finland/windows/windowslive/products/photos-share.aspx?tab=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090908/5c78fe0a/attachment.html>
More information about the postgis-users
mailing list