X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3B35ED1B8AC for ; Thu, 28 Aug 2003 22:48:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 18317-06 for ; Thu, 28 Aug 2003 19:47:51 -0300 (ADT) Received: from dbdevel.sunwave.net (Helium.sunwave.net [64.141.16.15]) by svr1.postgresql.org (Postfix) with ESMTP id F01B0D1B8BD for ; Thu, 28 Aug 2003 19:47:48 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by dbdevel.sunwave.net (Postfix) with ESMTP id C899A178003 for ; Thu, 28 Aug 2003 18:47:51 -0400 (EDT) From: Michael A Nachbaur To: pgsql-sql@postgresql.org Subject: Forcing a trigger to run Date: Thu, 28 Aug 2003 15:47:51 -0700 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308281547.51658.mike@nachbaur.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/349 X-Sequence-Number: 14965 Hello all, I have several tables with triggers on them that all collectively manage a series of summary tables. In any case, there are instances where changes to a given table may cause another trigger to need to be run. What I have is an EmailAddress table, with other tables describing aliases, forwards, etc. So, if an email address is changed, the triggers on it's aliases should be run to see if they are still valid. I was thinking of putting something in the trigger for EmailAddress that would effectively say: UPDATE EmailAddressAlias SET ID=ID WHERE EmailAddressID=CurrID; but that seems like a big hack. While this would force the alias' triggers to run, it seems to me that there should be a cleaner way of doing this. Suggestions, anyone? -- /* Michael A. Nachbaur * http://nachbaur.com/pgpkey.asc */ `I am so amazingly cool you could keep a side of meat in me for a month. I am so hip I have difficulty seeing over my pelvis.'