Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 0FC6C475A26 for ; Wed, 12 Jun 2002 16:44:14 -0400 (EDT) Received: from smtp016.mail.yahoo.com (smtp016.mail.yahoo.com [216.136.174.113]) by postgresql.org (Postfix) with SMTP id D3A714759B9 for ; Wed, 12 Jun 2002 16:44:12 -0400 (EDT) Received: from unknown (HELO saturn.janwieck.net) (janwieck@192.233.92.205 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 12 Jun 2002 20:44:14 -0000 Received: from Yahoo.com (saturn [127.0.0.1]) by saturn.janwieck.net (8.11.2/8.11.2) with ESMTP id g5CKW5l09445; Wed, 12 Jun 2002 16:32:06 -0400 Message-ID: <3D07AFC5.8F5413BF@Yahoo.com> Date: Wed, 12 Jun 2002 16:32:05 -0400 From: Jan Wieck X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.12 i686) X-Accept-Language: en MIME-Version: 1.0 To: GRIMOIS Eric Cc: pgsql-sql@postgresql.org Subject: Re: General trigger function References: <003401c211e5$9a5f1220$3d04a837@PXXXX> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/154 X-Sequence-Number: 8119 GRIMOIS Eric wrote: > > Hi all > > I read in the doc than a same function can be used for several triggers. > I tried to create a function who updates a field with a timestamp and > another field with the user name. This function is fired by triggers in > several tables. > It only works if updated fields have same names in all tables. I failed to > create a function where fields names are parameters of the function. You could do that with the EXECUTE functionality. But that causes *every* execution of these statemets not beeing cacheable, so it'll have an impact on performance. Jan > > What's the way to do that ? > Thanks. > > Eric GRIMOIS > Analyste programmeur > SEI - CPAM du Val d'Oise > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #