| From: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: mail alert |
| Date: | 2009-08-13 12:08:25 |
| Message-ID: | h60vnp$h8t$1@reversiblemaps.ath.cx |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On 2009-08-11, Jan Verheyden <jan(dot)verheyden(at)uz(dot)kuleuven(dot)ac(dot)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;
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jasen Betts | 2009-08-13 12:16:21 | Re: mail alert |
| Previous Message | Jan Verheyden | 2009-08-13 11:36:08 | simple? query |