Re: Send email when new record inserted - Mailing list pgsql-novice

From Stephan Szabo
Subject Re: Send email when new record inserted
Date
Msg-id 20040215115440.P88869@megazone.bigpanda.com
Whole thread Raw
In response to Send email when new record inserted  (Nick Tew <Nick.Tew@Budgens.co.uk>)
List pgsql-novice
On Thu, 12 Feb 2004, Nick Tew wrote:

> This may seem a trivial task, but im stumped. When a new record is inserted
> in one of my psql tables a need an email to be sent to pre-defined users.
> The users will be 'interested parties' to the record inserted - therefore
> these will be specified in a separate table. Is there a method for
> completing this process?

You can do this either from a trigger (written in C or an untrusted pl
language) or with a listening application using the listen/notify
interface.  The former has the problem that if the transaction is rolled
back, the email will already have been sent, but that may not be an issue
with your system.  The latter is a bit more involved.

pgsql-novice by date:

Previous
From: nospam@codefutures.com (Andy Grove)
Date:
Subject: [ANN] FireStorm/DAO now fully supports Postgres
Next
From: Stephan Szabo
Date:
Subject: Re: Fwd: Fwd: Lots of nan's