P3 is a good idea.
I think the best way to configure notifications is on a per job level. So I
need two fields in the pga_job table:
alter table pgagent.pga_job add column jobmailnotkind varchar(7) check
(jobmailnotkind in ('Success','Failure','Both'));
alter table pgagent.pga_job add column jobmailnotrecp varchar(320);
The SMTP server address is going to be an optional cl-argument (-s).
If this is going into a release. Can I assume that the fields are present,
even if pgagent is compiled without mail notification?
Background: I think, it would be inefficient to perform an extra select
between #ifdef MAIL_NOTIFICATION and #endif, so I would change this
statement in the Job::Execute() method.
"select * from pgagent.pga_jobstep
where jstenabled and jstjobid = ?
order by jstname, jstid"
"select js.*, j.jobmailnotkind, j.jobmailnotrecp from pgagent.pga_jobstep js
inner join pgagent.pga_job j on js.jstjobid = j.jobid
where js.jstenabled and js.jstjobid = ?
order by js.jstname, js.jstid"
Maybe, my questions seems to be silly, sorry for that. It's my first try to
contribute to an open source project.
2010/12/27 Dave Page <dpage(at)pgadmin(dot)org>
> On Mon, Dec 27, 2010 at 2:32 AM, Jasmin Dizdarevic
> <jasmin(dot)dizdarevic(at)gmail(dot)com> wrote:
> > Hi,
> > we've just decided to use pgAgent in our company, so I set it up and
> > discovered that there is no email notification support on failures.
> > I've decided to add this functionality, but I have some questions:
> > 1. Have there been any plans to add mail notification in the past?
> > 2. Is the feature desirable?
> It seems like a reasonable addition.
> > 3. I'm absolutely new to wxwidgets: Is wxSMTP a good idea?
> > (http://wiki.wxwidgets.org/WxSMTP)
> That seems like a good way forward, though to reduce the requirements
> on users who don't need it, the email feature should really be made
> optional, so if the user doesn't want it, they don't need the
> additional module to build pgAgent.
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
In response to
pgadmin-hackers by date
|Next:||From: Dave Page||Date: 2010-12-27 10:46:57|
|Subject: Re: Email notification pgAgent|
|Previous:||From: Dave Page||Date: 2010-12-27 07:21:18|
|Subject: Re: utffile symbol defined is strange.|