Re: pgAgent reports failure upon success

From: "Martin French" <Martin(dot)French(at)romaxtech(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-support(at)postgresql(dot)org,pgadmin-support-owner(at)postgresql(dot)org
Subject: Re: pgAgent reports failure upon success
Date: 2012-07-10 12:57:58
Message-ID: OFE3F5F4C7.38B73E7C-ON80257A37.0046014D-80257A37.004739C2@LocalDomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

<html><body><p><font size="2" face="sans-serif">Hi</font><br><br><tt><font size="2">Thanks for the feedback. I certainly won't be discouraged by it! :)</font></tt><br><br><tt><font size="2">&gt; - You have member name of [Get|Set]LastResult which set/return a<br>&gt; member variable called lastStatus. These should be consistent to avoid<br>&gt; confusion.</font></tt><br><br><tt><font size="2">Will amend accordingly.</font></tt><br><br><tt><font size="2">&gt; - Rather than setting lastStatus to 0 or -1, why not set it to<br>&gt; PQresultStatus(). That seems like it would be more useful in the<br>&gt; future (and potentially in the log files).</font></tt><br><br><tt><font size="2">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 &quot;if&quot;. Happy to code that in along the lines of (or inverse, testing for 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><font size="2">stepstatus = wxT(&quot;s&quot;);</font></tt><br><tt><font size="2"> break;</font></tt><br><tt><font size="2"> default:</font></tt><br><tt><font size="2"> </font></tt><tt><font size="2">stepstatus = steps-&gt;GetString(wxT(&quot;jstonerror&quot;));</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">&gt; - When creating the diff, please use &quot;git diff&quot;, or if working from a<br>&gt; source tarball (not recommended for development) - take 2 copies and<br>&gt; then diff them, eg &quot;diff -c -r pgagent-src/ pgagent-src.orig/ &gt;<br>&gt; mypatch.diff&quot;. That'll put the entire patch in one file, which makes<br>&gt; it much easier to handle and reapply.</font></tt><br><br><tt><font size="2">I'm afraid I'm limited to source tarballs at the moment. Attempting to pull from git gives me &quot;Connection Refused&quot;. So will create a single patch file using the 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 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(at)romaxtech(dot)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.
=================================================</font>
</body></html>

Attachment Content-Type Size
unknown_filename text/html 3.6 KB

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2012-07-10 15:05:18 Re: pgAgent reports failure upon success
Previous Message Dave Page 2012-07-10 12:19:54 Re: pgAgent reports failure upon success