[postgis-users] Points and lines

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Sep 8 03:52:43 PDT 2009


Tuomas Ruohonen wrote:

> Hi,
> 
> Lets think that i am inserting only rows to table, not updating any data.
> These NEW and OLD pseudos are still helping me ?
> 
> Br.
> Tuomas

Since your stored procedure is a trigger, it gets called once per row. 
However, you have an UPDATE in there without a WHERE clause, and hence 
you are changing all records in entire table for each row update.

Again, you need to look at the link in my previous email which contains 
a trigger example. You should also look at whether you should be using a 
BEFORE trigger rather than an AFTER trigger.


HTH,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-users mailing list