pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Thiele <erik@thiele-hydraulik.de>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-sql@postgresql.org
Subject: Re: fine grained trigger time specification...
Date: Tue, 23 Mar 2004 17:56:25 +0100
Message-ID: <20040323175625.4610b511.erik@thiele-hydraulik.de> (raw)
In-Reply-To: <20040323161731.GC22109@wolff.to>
References: <20040323151913.13de3fa7.erik@thiele-hydraulik.de>
	<20040323161731.GC22109@wolff.to>

On Tue, 23 Mar 2004 10:17:31 -0600
Bruno Wolff III <bruno@wolff.to> wrote:

> 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?

no, because

1) my postgresql version does not support "for each statement"

2) i am also inserting with multiple insert commands thousands of entries.




-- 
Erik Thiele



view thread (4+ messages)  latest in thread

Message-ID: <20040323175625.4610b511.erik@thiele-hydraulik.de>
Permalink:  ../20040323175625.4610b511.erik@thiele-hydraulik.de/
Also on:    postgresql.org/message-id/20040323175625.4610b511.erik@thiele-hydraulik.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: erik@thiele-hydraulik.de, bruno@wolff.to
  Subject: Re: fine grained trigger time specification...
  In-Reply-To: <20040323175625.4610b511.erik@thiele-hydraulik.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox