Skip site navigation (1) Skip section navigation (2)

Re: How to send an email when data is inserted into a table

From: "Fontenot, Paul" <Paul(dot)Fontenot(at)bannerhealth(dot)com>
To: "Nicholas Allen" <Allen(dot)Nicholas(at)lycos(dot)co(dot)uk>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How to send an email when data is inserted into a table
Date: 2003-05-22 19:12:16
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
I'm using pgMail for this type of capability. Go to and search for pgMail

-----Original Message-----
From: Nicholas Allen [mailto:Allen(dot)Nicholas(at)lycos(dot)co(dot)uk] 
Sent: Thursday, May 22, 2003 8:42 AM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] How to send an email when data is inserted into a


I have a table which stores bugs which can be submitted by users of our
program. I would like a way that when a new bug is inserted an email is
to the developers informing them of this. 

I tried using a python trigger function to execute sendmail and pipe
headers to it but the problem seems to be that the python functions are 
interpretted in a restrictive environment and don't allow access to
resources (files /processes etc). When I execute the python function
of postgres it works fine but not when used as a trigger functions.

I know I can do it by writing a C function but I would rather not use C
possible in the case. Python would be easier to maintain.

Any ideas? Do I have to use C or is there a way to do this from pyhton?

Thanks in advance for any help,

Nicholas Allen.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

pgsql-novice by date

Next:From: Julie MayDate: 2003-05-22 21:21:13
Subject: Unable to open PostgreSQL large object
Previous:From: Steve CrawfordDate: 2003-05-22 18:15:22
Subject: Re: Unaccounted for disk use

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group