Skip site navigation (1) Skip section navigation (2)

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 11:04:40
Message-ID: CA+OCxoy7VPu3SS1_mQP9Axehvt_M04P6WAyDD1w8sNXJZ-SrqQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
Great, that got it :-).

Thanks Martin - patch applied and push to the main repo. It'll be
included in the next release.

On Tue, Jul 17, 2012 at 10:52 AM, Martin French
<Martin(dot)French(at)romaxtech(dot)com> wrote:
> Hi Dave.
>
> Dave Page <dpage(at)pgadmin(dot)org> wrote on 17/07/2012 10:45:28:
>
>> 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
>> Date: 17/07/2012 10:45
>
>> Subject: Re: [pgadmin-hackers] Propsed pgagent patch: pgAgent
>> reports failure upon success - For Review
>>
>> 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
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
> The patch was generated with git diff. I've just picked up the file off the
> box with WinSCP directly and emailed it...
>
> I've FTP'd to my local machine this time...
>
> cheers
>
> (See attached file: pgagent.patch)
>
> ============================================= 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

pgadmin-hackers by date

Next:From: Martin FrenchDate: 2012-07-17 12:02:17
Subject: Re: Propsed pgagent patch: pgAgent reports failure upon success - For Review
Previous:From: Dave PageDate: 2012-07-17 11:03:59
Subject: pgAgent commit: Ensure that SQL steps have their success or failurerep

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group