From: Michael A Nachbaur <mike@nachbaur.com>
To: pgsql-sql@postgresql.org
Subject: Forcing a trigger to run
Date: Thu, 28 Aug 2003 15:47:51 -0700
Message-ID: <200308281547.51658.mike@nachbaur.com> (raw)
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 <mike@nachbaur.com>
* 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.'
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: mike@nachbaur.com
Subject: Re: Forcing a trigger to run
In-Reply-To: <200308281547.51658.mike@nachbaur.com>
* 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