Re: Email and Postgres

Thomas Good <tomg@q8.nrnet.org>

From: Thomas Good <tomg@q8.nrnet.org>
To: Ian Kulmatycki <ikulmatycki@movement-inc.com>
Cc: pgsql-novice@postgresql.org
Date: 2000-11-07T13:21:50Z
Lists: pgsql-novice
On Mon, 6 Nov 2000, Ian Kulmatycki wrote:

> Hi all,
> Does anyone know if you can send email using pgsql and triggers or some
> other way?
> Thanks

Some other way:  I don't use triggers much.  My interface does the
work...so:

I have perl do it.  Using the binding operator ( =~ ) I search a 
text str for a regex.  If found the perl script looks up a list of
addresses in a db relation and sends them mail.   If you want a
look at my src say the word.

Hmm...thinking on this abit:  you could insert into a table (named
shell or whatever) a unix command.  Then, when your expr evals to
true you could do a system() call...at least in C or perl...
just thinking aloud!

Good hunting,
Tom

--------------------------------------------------------------------
               SVCMC - Center for Behavioral Health                  
--------------------------------------------------------------------
Thomas Good                          tomg@ { admin | q8 } .nrnet.org
IS Coordinator / DBA                 Phone: 718-354-5528 
                                     Fax:   718-354-5056  
--------------------------------------------------------------------
Powered by:  PostgreSQL     s l a c k w a r e          FreeBSD:
               RDBMS       |---------- linux      The Power To Serve
--------------------------------------------------------------------