From: | "Eric D(dot) Nielsen" <nielsene(at)MIT(dot)EDU> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Eric D(dot) Nielsen" <nielsene(at)mit(dot)edu> |
Subject: | Need some advice on appropriate PL strategy... |
Date: | 2004-10-12 05:11:07 |
Message-ID: | 1F7B6486-1C0D-11D9-8B8A-000A95A0A9C8@mit.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm in the process of implementing a "monitor this" type feature on a
web-application. When something changes on the monitored item an email
to the subscriber is generated. I'd like to do this via triggers
instead of application logic. As far as I can tell pl/pgsql does not
include any method for e-mailing as a function side-effect. So I need
to choose a different PL. The function is basically a series of
queries, coupled with a mailing ( look up details of new event; lookup
subscribers and exclude poster of new event from subscriber list, if
present; email subscribers) -- so, aside from the emailing bit, its
trivial in pl/pgsql.
The web application is in PHP, so using pl/PHP could be nice, but I
haven't found a lot of information on pl/PHP to know its relative
maturity/stableness. I'm also familiar with Java, Python, C, much less
familiar with Perl. In order to e-mail will I need a trusted or
untrusted version of the procedural language?
I guess I could alternatively just code up a simple mail function in
another PL and then call that function from pl/pgsql. Is there any
merit to this approach over the "whole-trigger" in another PL method?
Thank you,
Eric Nielsen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-10-12 05:21:37 | Re: 'NOW' in UTC with no timezone |
Previous Message | Stuart Bishop | 2004-10-12 05:04:20 | 'NOW' in UTC with no timezone |