Re: Propsed pgagent patch: pgAgent reports failure upon success - For Review

From: "Martin French" <Martin(dot)French(at)romaxtech(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org,pgadmin-hackers-owner(at)postgresql(dot)org
Subject: Re: Propsed pgagent patch: pgAgent reports failure upon success - For Review
Date: 2012-07-17 12:02:17
Message-ID: OF227E8F84.F97E9A4D-ON80257A3E.00420A24-80257A3E.0042207C@LocalDomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

<html><body><p><font size="2" face="sans-serif">Hi</font><br><br><tt><font size="2">Dave Page &lt;dpage(at)pgadmin(dot)org&gt; wrote on 17/07/2012 12:04:40:<br><br>&gt; From: Dave Page &lt;dpage(at)pgadmin(dot)org&gt;</font></tt><br><tt><font size="2">&gt; To: Martin French &lt;Martin(dot)French(at)romaxtech(dot)com&gt;, </font></tt><br><tt><font size="2">&gt; Cc: pgadmin-hackers(at)postgresql(dot)org, pgadmin-hackers-owner(at)postgresql(dot)org</font></tt><br><tt><font size="2">&gt; Date: 17/07/2012 12:04</font></tt><br><tt><font size="2">&gt; Subject: Re: [pgadmin-hackers] Propsed pgagent patch: pgAgent <br>&gt; reports failure upon success - For Review</font></tt><br><tt><font size="2">&gt; <br>&gt; Great, that got it :-).<br>&gt; <br>&gt; Thanks Martin - patch applied and push to the main repo. It'll be<br>&gt; included in the next release.<br>&gt; <br>&gt; On Tue, Jul 17, 2012 at 10:52 AM, Martin French<br>&gt; &lt;Martin(dot)French(at)romaxtech(dot)com&gt; wrote:<br>&gt; &gt; Hi Dave.<br>&gt; &gt;<br>&gt; &gt; Dave Page &lt;dpage(at)pgadmin(dot)org&gt; wrote on 17/07/2012 10:45:28:<br>&gt; &gt;<br>&gt; &gt;&gt; From: Dave Page &lt;dpage(at)pgadmin(dot)org&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;&gt; To: Martin French &lt;Martin(dot)French(at)romaxtech(dot)com&gt;,<br>&gt; &gt;&gt; Cc: pgadmin-hackers(at)postgresql(dot)org, pgadmin-hackers-owner(at)postgresql(dot)org<br>&gt; &gt;&gt; Date: 17/07/2012 10:45<br>&gt; &gt;<br>&gt; &gt;&gt; Subject: Re: [pgadmin-hackers] Propsed pgagent patch: pgAgent<br>&gt; &gt;&gt; reports failure upon success - For Review<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; This still seems to be malformed - I'm getting:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; raptor:pgagent dpage$ patch -p1 &lt; ~/Downloads/pgagent.patch<br>&gt; &gt;&gt; (Stripping trailing CRs from patch.)<br>&gt; &gt;&gt; patching file connection.cpp<br>&gt; &gt;&gt; patch: **** malformed patch at line 6: if (result)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Looking at the patch itself, it looks like the indentation is missing<br>&gt; &gt;&gt; from the first hunk for connection.cpp:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; diff --git a/connection.cpp b/connection.cpp<br>&gt; &gt;&gt; index 5e10078..6103c00 100644<br>&gt; &gt;&gt; --- a/connection.cpp<br>&gt; &gt;&gt; +++ b/connection.cpp<br>&gt; &gt;&gt; @@ -336,6 +336,7 @@ DBresult::DBresult(DBconn *conn, const wxString<br>&gt; &gt;&gt; &amp;query)<br>&gt; &gt;&gt; if (result)<br>&gt; &gt;&gt; {<br>&gt; &gt;&gt; int rc = PQresultStatus(result);<br>&gt; &gt;&gt; + conn-&gt;SetLastResult(rc);<br>&gt; &gt;&gt; if (rc == PGRES_TUPLES_OK)<br>&gt; &gt;&gt; maxRows = PQntuples(result);<br>&gt; &gt;&gt; else if (rc != PGRES_COMMAND_OK)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; If I look at the source file, it's more like this (he says, hoping<br>&gt; &gt;&gt; Gmail doesn't mangle it):<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; if (result)<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int rc = PQresultStatus(result);<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rc == PGRES_TUPLES_OK)<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxRows = PQntuples(result);<br>&gt; &gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (rc != PGRES_COMMAND_OK)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; How are you generating the patch? Has your unmodified version been<br>&gt; &gt;&gt; inadvertently modified?<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Tue, Jul 17, 2012 at 7:22 AM, Martin French<br>&gt; &gt;&gt; &lt;Martin(dot)French(at)romaxtech(dot)com&gt; wrote:<br>&gt; &gt;&gt; &gt; (See attached file: pgAgent.patch)<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Hi<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; pgadmin-hackers-owner(at)postgresql(dot)org wrote on 16/07/2012 15:52:45:<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; From: Dave Page &lt;dpage(at)pgadmin(dot)org&gt;<br>&gt; &gt;&gt; &gt;&gt; To: Martin French &lt;Martin(dot)French(at)romaxtech(dot)com&gt;,<br>&gt; &gt;&gt; &gt;&gt; Cc: pgadmin-hackers(at)postgresql(dot)org<br>&gt; &gt;&gt; &gt;&gt; Date: 16/07/2012 18:55<br>&gt; &gt;&gt; &gt;&gt; Subject: Re: [pgadmin-hackers] Propsed pgagent patch: pgAgent<br>&gt; &gt;&gt; &gt;&gt; reports failure upon success - For Review<br>&gt; &gt;&gt; &gt;&gt; Sent by: pgadmin-hackers-owner(at)postgresql(dot)org<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; Hi<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; Can you resend the patch as an attachment please? It's getting<br>&gt; &gt;&gt; &gt;&gt; corrupted inline in email.<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; Thanks.<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt; On Mon, Jul 16, 2012 at 2:46 PM, Martin French<br>&gt; &gt;&gt; &gt;&gt; &lt;Martin(dot)French(at)romaxtech(dot)com&gt; wrote:<br>&gt; &gt;&gt; &gt;&gt; &gt; Hi,<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; I have attempted a patch for an issue where pgAgent incorrectly<br>&gt; &gt;&gt; &gt;&gt; &gt; reports<br>&gt; &gt;&gt; &gt;&gt; &gt; failure on a plain SQL job. Please see below.<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Feedback/comments welcome.<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Thanks<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt; Martin French.<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;&gt;<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Patch attached. Apologies for that. :)<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Cheers<br>&gt; &gt;&gt; &gt;<br>&gt; &gt;&gt; &gt; Martin French<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt; The patch was generated with git diff. I've just picked up the file off the<br>&gt; &gt; box with WinSCP directly and emailed it...<br>&gt; &gt;<br>&gt; &gt; I've FTP'd to my local machine this time...<br>&gt; &gt;<br>&gt; &gt; cheers<br>&gt; &gt;<br>&gt; &gt; (See attached file: pgagent.patch)<br>&gt; <br>&gt; <br>Great Stuff. Thanks for the assistance Dave. </font></tt><br><br><tt><font size="2">Cheers</font></tt><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 7.0 KB

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2012-07-17 12:52:09 Re: SSH Tunneling implementation
Previous Message Dave Page 2012-07-17 11:04:40 Re: Propsed pgagent patch: pgAgent reports failure upon success - For Review