Re: a trigger that sends an email

From: Craig Orsinger <orsingerc(at)epg-gw1(dot)lewis(dot)army(dot)mil>
To: "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: a trigger that sends an email
Date: 2000-04-06 17:54:52
Message-ID: XFMail.000406105452.orsingerc@epg-gw1.lewis.army.mil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


On 06-Apr-00 Tom Lane wrote:
> "Oscar Serrano" <oserra(at)fondos(dot)net> writes:

[snip]

> One possibility is to set up an always-running application that connects
> to the database and then just sits there waiting for records to be added
> to the table, then sends the email when that happens. You could use a
> NOTIFY command (executed by a trigger on the table) to wake up the app
> when something happens, so that it doesn't need to take up CPU time
> checking the table unnecessarily.
>
Seems like if you really want e-mail, a separate program
that waits for a NOTIFY event and then sends e-mail might be the
best answer. I may be off-base here, but it seems best to keep
functions that are run by the database as light and simple as
possible. Sending e-mail, using C or any other method, is a pretty
complex action. A separate program could be written in Perl, C,
C++, or TCL, or any other language that has PostgreSQL bindings
or libraries.

----------------------------------
Date: 06-Apr-00 Time: 10:50:16

Craig Orsinger (email: <orsingerc(at)epg-gw1(dot)lewis(dot)army(dot)mil>)
Logicon RDA
Bldg. 8B28 "Just another megalomaniac with ideas above his
6th & F Streets station. The Universe is full of them."
Ft. Lewis, WA 98433 - The Doctor
----------------------------------

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message robin 2000-04-06 19:21:12 Re: Finding out the OID after an INSERT with JDBC?
Previous Message Tom Lane 2000-04-06 17:52:44 Re: a trigger that sends an email