Re: pgAgent reports failure upon success - Mailing list pgadmin-support
From | Martin French |
---|---|
Subject | Re: pgAgent reports failure upon success |
Date | |
Msg-id | OFE3F5F4C7.38B73E7C-ON80257A37.0046014D-80257A37.004739C2@LocalDomain Whole thread Raw |
In response to | Re: pgAgent reports failure upon success (Dave Page <dpage@pgadmin.org>) |
Responses |
Re: pgAgent reports failure upon success
|
List | pgadmin-support |
<p><font face="sans-serif" size="2">Hi</font><br /><br /><tt><font size="2">Thanks for the feedback. I certainly won't bediscouraged by it! :)</font></tt><br /><br /><tt><font size="2">> - You have member name of [Get|Set]LastResult whichset/return a<br />> member variable called lastStatus. These should be consistent to avoid<br />> confusion.</font></tt><br/><br /><tt><font size="2">Will amend accordingly.</font></tt><br /><br /><tt><font size="2">>- Rather than setting lastStatus to 0 or -1, why not set it to<br />> PQresultStatus(). That seems like itwould be more useful in the<br />> future (and potentially in the log files).</font></tt><br /><br /><tt><font size="2">I'dset it to only two values, as it made the comparison easier. As I see it, ExecStatusType ENUM can be anyone of0 - 8 inclusive, but some of those are error messages, so it'd either have to determine which ones are OK and which arenot either with a case statement or with an extended "if". Happy to code that in along the lines of (or inverse, testingfor fails...):</font></tt><br /><br /><tt><font size="2">switch (rc)</font></tt><br /><tt><font size="2">{</font></tt><br/><tt><font size="2"> case PGRES_COMMAND_OK:</font></tt><br /><tt><font size="2"> case PGRES_TUPLES_OK:</font></tt><br/><tt><font size="2"> case PGRES_COPY_OUT:</font></tt><br /><tt><font size="2"> case PGRES_COPY_IN:</font></tt><br/><tt><font size="2"> case PGRES_COPY_BOTH:</font></tt><br /><tt><font size="2"> </font></tt><tt><fontsize="2">stepstatus = wxT("s");</font></tt><br /><tt><font size="2"> break;</font></tt><br /><tt><fontsize="2"> default:</font></tt><br /><tt><font size="2"> </font></tt><tt><font size="2">stepstatus = steps->GetString(wxT("jstonerror"));</font></tt><br/><tt><font size="2"> break</font></tt><br /><tt><font size="2">}</font></tt><br/><br /><tt><font size="2">If you think that's a more viable option? Let me know and I'll sort it:)</font></tt><br /><br /><tt><font size="2">> - When creating the diff, please use "git diff", or if working from a<br/>> source tarball (not recommended for development) - take 2 copies and<br />> then diff them, eg "diff -c -rpgagent-src/ pgagent-src.orig/ ><br />> mypatch.diff". That'll put the entire patch in one file, which makes<br />>it much easier to handle and reapply.</font></tt><br /><br /><tt><font size="2">I'm afraid I'm limited to source tarballsat the moment. Attempting to pull from git gives me "Connection Refused". So will create a single patch file usingthe method suggested.</font></tt><br /><br /><tt><font size="2">Cheers</font></tt><br /><br /><tt><font size="2">Martin.</font></tt><br /><font face="sans-serif">============================================= Romax TechnologyLimited 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 andcontains information that is confidential and privileged. Unless you are the named addressee, or authorised to receiveit on behalf of the addressee you may not copy or use it, or disclose it to anyone else. If you have received thistransmission in error please delete from your system and contact the sender. Thank you for your cooperation. =================================================</font>
pgadmin-support by date: