Triggers that send emails

From: "Rodolfo J(dot) Paiz" <rpaiz(at)simpaticus(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Triggers that send emails
Date: 2005-04-04 05:15:05
Message-ID: 1112591705.6681.61.camel@rodolfo.casa.paiz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)simpaticus(dot)com>

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Aarni Ruuhimäki 2005-04-04 06:00:34 Re: Database Encoding
Previous Message operationsengineer1 2005-04-03 20:46:55 Database Encoding