Re: mail alert

From: Denis BUCHER <dbucherml(at)hsolutions(dot)ch>
To: Jan Verheyden <jan(dot)verheyden(at)uz(dot)kuleuven(dot)ac(dot)be>
Cc: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: mail alert
Date: 2009-08-11 22:35:48
Message-ID: 4A81F244.9070402@hsolutions.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

Jan Verheyden a écrit :
> I was looking in what way it’s possible to alert via mail when some
> conditions are true in a database.

a) If the alert is not "very urgent" i.e. you can alter some minutes
later I would do it like this :

1. Create a function that returns what you need, most importantly if the
conditions are met

2. Create a script that does something like "SELECT * FROM function()..."

b) If the email should be sent immediately, you could create a perl
function in the database, launched by a TRIGGER and launching an
"external" script...

Therefore, first you have to know the requirements...

Denis

In response to

  • mail alert at 2009-08-11 13:01:31 from Jan Verheyden

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rob Sargent 2009-08-12 01:38:26 Re: mail alert
Previous Message Steve Crawford 2009-08-11 22:32:38 Re: Month/year between two dates