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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Martin French <Martin(dot)French(at)romaxtech(dot)com>
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 09:45:28
Message-ID: CA+OCxow_Gu2-=uUXHJHdkF-xwfsMVyMwdNOu=POpwRa7z++MUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

This still seems to be malformed - I'm getting:

raptor:pgagent dpage$ patch -p1 < ~/Downloads/pgagent.patch
(Stripping trailing CRs from patch.)
patching file connection.cpp
patch: **** malformed patch at line 6: if (result)

Looking at the patch itself, it looks like the indentation is missing
from the first hunk for connection.cpp:

diff --git a/connection.cpp b/connection.cpp
index 5e10078..6103c00 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -336,6 +336,7 @@ DBresult::DBresult(DBconn *conn, const wxString &query)
if (result)
{
int rc = PQresultStatus(result);
+ conn->SetLastResult(rc);
if (rc == PGRES_TUPLES_OK)
maxRows = PQntuples(result);
else if (rc != PGRES_COMMAND_OK)

If I look at the source file, it's more like this (he says, hoping
Gmail doesn't mangle it):

if (result)
{
int rc = PQresultStatus(result);
if (rc == PGRES_TUPLES_OK)
maxRows = PQntuples(result);
else if (rc != PGRES_COMMAND_OK)

How are you generating the patch? Has your unmodified version been
inadvertently modified?

On Tue, Jul 17, 2012 at 7:22 AM, Martin French
<Martin(dot)French(at)romaxtech(dot)com> wrote:
> (See attached file: pgAgent.patch)
>
> Hi
>
> pgadmin-hackers-owner(at)postgresql(dot)org wrote on 16/07/2012 15:52:45:
>
>> From: Dave Page <dpage(at)pgadmin(dot)org>
>> To: Martin French <Martin(dot)French(at)romaxtech(dot)com>,
>> Cc: pgadmin-hackers(at)postgresql(dot)org
>> Date: 16/07/2012 18:55
>> Subject: Re: [pgadmin-hackers] Propsed pgagent patch: pgAgent
>> reports failure upon success - For Review
>> Sent by: pgadmin-hackers-owner(at)postgresql(dot)org
>
>
>>
>> Hi
>>
>> Can you resend the patch as an attachment please? It's getting
>> corrupted inline in email.
>>
>> Thanks.
>>
>> On Mon, Jul 16, 2012 at 2:46 PM, Martin French
>> <Martin(dot)French(at)romaxtech(dot)com> wrote:
>> > Hi,
>> >
>> > I have attempted a patch for an issue where pgAgent incorrectly reports
>> > failure on a plain SQL job. Please see below.
>> >
>> > Feedback/comments welcome.
>> >
>> > Thanks
>> >
>> > Martin French.
>> >
>> >
>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
> Patch attached. Apologies for that. :)
>
> Cheers
>
> Martin French============================================= 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.
> =================================================

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Martin French 2012-07-17 09:52:24 Re: Propsed pgagent patch: pgAgent reports failure upon success - For Review
Previous Message Dave Page 2012-07-17 08:20:27 Re: SSH Tunneling implementation