X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 40920D1EC4E for ; Tue, 23 Mar 2004 16:56:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 58827-07 for ; Tue, 23 Mar 2004 12:56:31 -0400 (AST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by svr1.postgresql.org (Postfix) with ESMTP id 9BBE9D1CCA7 for ; Tue, 23 Mar 2004 12:56:29 -0400 (AST) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1B5pCV-0001iB-00; Tue, 23 Mar 2004 17:56:27 +0100 Received: from [80.131.202.157] (helo=goofy.thiele-intern) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1B5pCU-0008NK-00; Tue, 23 Mar 2004 17:56:27 +0100 Date: Tue, 23 Mar 2004 17:56:25 +0100 From: Erik Thiele To: Bruno Wolff III Cc: pgsql-sql@postgresql.org Subject: Re: fine grained trigger time specification... Message-Id: <20040323175625.4610b511.erik@thiele-hydraulik.de> In-Reply-To: <20040323161731.GC22109@wolff.to> References: <20040323151913.13de3fa7.erik@thiele-hydraulik.de> <20040323161731.GC22109@wolff.to> Organization: Thiele-Hydraulik X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:323d4a9045def897d7bf2e2f3ae17486 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/235 X-Sequence-Number: 17334 On Tue, 23 Mar 2004 10:17:31 -0600 Bruno Wolff III wrote: > On Tue, Mar 23, 2004 at 15:19:13 +0100, > Erik Thiele 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