Hi

pgadmin-support-owner@postgresql.org wrote on 10/07/2012 16:05:18:

> From: Dave Page <dpage@pgadmin.org>

> To: Martin French <Martin.French@romaxtech.com>,
> Cc: pgadmin-support@postgresql.org, pgadmin-support-owner@postgresql.org
> Date: 10/07/2012 19:12
> Subject: Re: [pgadmin-support] pgAgent reports failure upon success
> Sent by: pgadmin-support-owner@postgresql.org
>
> On Tue, Jul 10, 2012 at 1:57 PM, Martin French
> <Martin.French@romaxtech.com> wrote:
> > Hi
> >
> > Thanks for the feedback. I certainly won't be discouraged by it! :)
>
> :-)
>
> >> - You have member name of [Get|Set]LastResult which set/return a
> >> member variable called lastStatus. These should be consistent to avoid
> >> confusion.
> >
> > Will amend accordingly.
>
> Thanks.
>
> >> - Rather than setting lastStatus to 0 or -1, why not set it to
> >> PQresultStatus(). That seems like it would be more useful in the
> >> future (and potentially in the log files).
> >
> > I'd set it to only two values, as it made the comparison easier. As I see
> > it, ExecStatusType ENUM can be anyone of 0 - 8 inclusive, but some of those
> > are error messages, so it'd either have to determine which ones are OK and
> > which are not either with a case statement or with an extended "if". Happy
> > to code that in along the lines of (or inverse, testing for fails...):
> >
> > switch (rc)
> > {
> > case PGRES_COMMAND_OK:
> > case PGRES_TUPLES_OK:
> > case PGRES_COPY_OUT:
> > case PGRES_COPY_IN:
> > case PGRES_COPY_BOTH:
> >
> > stepstatus = wxT("s");
> > break;
> > default:
> >
> > stepstatus = steps->GetString(wxT("jstonerror"));
> > break
> > }
> >
> > If you think that's a more viable option? Let me know and I'll sort it :)
>
> That's a little more complex for this case, but I think it'll make the
> dbconn class more useful for the future. You could of course wrap that
> switch statement up in the class as well, and offer another public
> member that returns a simple boolean indicating if the last status was
> a success or failure.

Agreed, I'll see what I can put together today (time permitting).

>
> >> - When creating the diff, please use "git diff", or if working from a
> >> source tarball (not recommended for development) - take 2 copies and
> >> then diff them, eg "diff -c -r pgagent-src/ pgagent-src.orig/ >
> >> mypatch.diff". That'll put the entire patch in one file, which makes
> >> it much easier to handle and reapply.
> >
> > I'm afraid I'm limited to source tarballs at the moment. Attempting to pull
> > from git gives me "Connection Refused". So will create a single patch file
> > using the method suggested.
>
> Hmm, this works for me:
>
> git clone git://git.postgresql.org/git/pgagent.git
>
> or, if you're on a network that blocks the git protocol, you might
> want to try:
>
> git clone http://git.postgresql.org/git/pgagent.git
>
> Please let me know if that doesn't work, as I'm one of the admins for
> that server as well so obviously want to fix any problems.
>

The http link works now. I think the problem was this end, as it's a new VM I'm using, so is not configured perhaps as well as It should be!

Cheers


Martin.============================================= Romax Technology Limited Rutherford House Nottingham Science & Technology Park Nottingham, NG7 2PZ England Telephone numbers: +44 (0)115 951 88 00 (main) For other office locations see: http://www.romaxtech.com/Contact ================================= =============== E-mail: info@romaxtech.com Website: www.romaxtech.com ================================= ================ Confidentiality Statement This transmission is for the addressee only and contains information that is confidential and privileged. Unless you are the named addressee, or authorised to receive it on behalf of the addressee you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please delete from your system and contact the sender. Thank you for your cooperation. =================================================