Re: a trigger that sends an email

Поиск
Список
Период
Сортировка
От Craig Orsinger
Тема Re: a trigger that sends an email
Дата
Msg-id XFMail.000406105452.orsingerc@epg-gw1.lewis.army.mil
обсуждение исходный текст
Ответ на Re: a trigger that sends an email  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
On 06-Apr-00 Tom Lane wrote:
> "Oscar Serrano" <oserra@fondos.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@epg-gw1.lewis.army.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
----------------------------------


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: a trigger that sends an email
Следующее
От: robin
Дата:
Сообщение: Re: Finding out the OID after an INSERT with JDBC?