| From: | Christopher Browne <cbbrowne(at)acm(dot)org> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Trigger email? |
| Date: | 2005-03-01 23:23:22 |
| Message-ID: | 60k6ort0gl.fsf@dba2.int.libertyrms.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
cool_screen_name90001(at)yahoo(dot)com (CSN) writes:
> Is it possible to setup a trigger so that every time a
> certain field is changed, an email is sent? Using
> pl/pgsql.
Something _like_ that is possible.
What I would do instead is for the trigger to cause a record to be put
into a table that might be called something like "submit_email".
An asynchronous process (that might look for NOTIFY requests!) would
then rummage thru submit_email to find messages it needs to send.
That allows you to keep this sort of thing under some degree of
control.
- It means you're not concurrently spawning 157 MTA connections; the
"mail manager" only needs to open _one_ connection
- It means you have some ability to manage how much mail gets sent out
at once.
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/linuxxian.html
A VAX is virtually a computer, but not quite.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2005-03-01 23:49:38 | Re: JDBC and Portals . Clarification |
| Previous Message | Chris Kratz | 2005-03-01 22:38:42 | Re: Novice Question |