Triggers that send emails - Mailing list pgsql-novice

From Rodolfo J. Paiz
Subject Triggers that send emails
Date
Msg-id 1112591705.6681.61.camel@rodolfo.casa.paiz.org
Whole thread Raw
Responses Removing Rows in Foreign Keys
List pgsql-novice
Hi:

Thanks in part to your help, I've now got a few simple queries and forms
running on my website, using PHP and PEAR to talk to Postgres. :-)

In one case, I've set up a form where users can provide feedback for me.
This form causes an INSERT to a table, and appears to be working well;
but if I don't check the table manually, I'll never know when someone
left me a note!

I am aware that "triggers" or "stored procedures" or something like that
will be able to run a process every time the table is updated, and that
this is what I will need to use to make the database email me every time
someone leaves feedback. I've just started reading about triggers in the
manual for this purpose.

However, so as not to reinvent the wheel, is there a code snippet out
there which is public domain and which will show me easily how to use a
trigger to send an email message? I have not found one yet with Google,
so I thought I'd ask here.

Thanks!

--
Rodolfo J. Paiz <rpaiz@simpaticus.com>


pgsql-novice by date:

Previous
From:
Date:
Subject: Database Encoding
Next
From: Aarni Ruuhimäki
Date:
Subject: Re: Database Encoding