Re: fine grained trigger time specification... - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: fine grained trigger time specification...
Date
Msg-id 20040323161731.GC22109@wolff.to
Whole thread Raw
In response to fine grained trigger time specification...  (Erik Thiele <erik@thiele-hydraulik.de>)
List pgsql-sql
On Tue, Mar 23, 2004 at 15:19:13 +0100, Erik Thiele <erik@thiele-hydraulik.de> wrote:
> now sadly i am getting this kind of problem:
> 
> 
> zeit=> insert into a select
> nextval('delmeseq'),personalnumber,datum,datum from calendar where
> type=10409;
> INSERT 0 581   <-- see, 581 inserts which is pretty much :)
> zeit=> commit;  <--  now i have to wait for 581 calls of alwayscheck
> 
> 
> since alwayscheck is not the fastest function on earth, i'd like to have
> it called on commit time if at least one of table a or b was modified,
> but always only once per commit. is there a way to formulate this:
> 
> ARRANGE FOR CALL OF FUNCTION alwayscheck() ON COMMIT WHEN AT LEAST ONE
> OF TABLE a OR TABLE b WAS MODIFIED BUT CALL THE FUNCTION AT MOST ONE
> TIME;

Wouldn't changing your triggers to be for each statement instead of for
each row fix this?


pgsql-sql by date:

Previous
From: Erik Thiele
Date:
Subject: Re: fine grained trigger time specification...
Next
From: Stephan Szabo
Date:
Subject: Re: fine grained trigger time specification...