From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: mail alert
Date: 13 Aug 2009 12:08:25 GMT
Message-ID: <h60vnp$h8t$1@reversiblemaps.ath.cx> (raw)
References: <E30C7040DE22624185BAD4093190B54437BE5DB49C@EX2007-MBX-2.uz.kuleuven.ac.be>
On 2009-08-11, Jan Verheyden <jan.verheyden@uz.kuleuven.ac.be> wrote:
>
> Hi All,
>
> I was looking in what way it's possible to alert via mail when some conditi=
> ons are true in a database.
>
> Thanks in advance!
Assuming you mean email, and not ink on paper (hmm, OTOH you could load
postcards into a printer....)
you could do this using NOTIFY and a listener written in some other
langauge, notify is really neat.
or possibly invoke mail(1) with a plpythonu or C function,
or as superuser you can write a file (using copy ...) and arrange for something else to
look, find it, and mail it.
arbitrary file contents are possible with copy:
COPY (SELECT NULL) TO myfile_name WITH NULL AS myfile_contents;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jasen@xnet.co.nz
Subject: Re: mail alert
In-Reply-To: <h60vnp$h8t$1@reversiblemaps.ath.cx>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox