Re: [pgadmin-support] pgAgent reports failure upon success
Proposed patch for this bug in attached files.(See attached file: connection.cpp)(See attached file: connection.h)(See attached file: job.cpp)Tested against PG 9.1.4, all seems fine, success/failure reported correctly even when multiple jobs ran concurrently.Please test and feed back.Thanks.pgadmin-support-ow...@postgresql.org wrote on 06/07/2012 12:29:56:> From: Dave Page > To: Martin French , > Cc: pgadmin-support@postgresql.org> Date: 06/07/2012 15:35> Subject: Re: [pgadmin-support] pgAgent reports failure upon success> Sent by: pgadmin-support-ow...@postgresql.org> > > On Fri, Jul 6, 2012 at 12:26 PM, Martin French > > wrote:> Yep, can do, and will do Dave.> > Will be after the weekend now, but should have something Monday eve.> Great.> > Have a good weekend mate.> > Cheers> > And you! > > Cheers, Dave.> > -- > Dave Page> Blog: http://pgsnake.blogspot.com> Twitter: @pgsnake> > EnterpriseDB UK: http://www.enterprisedb.com> The Enterprise PostgreSQL Company= 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: i...@romaxtech.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. = job.cpp Description: Binary data connection.h Description: Binary data connection.cpp Description: Binary data -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] pgAgent reports failure upon success
Hi On Mon, Jul 9, 2012 at 10:11 AM, Martin French wrote: > Proposed patch for this bug in attached files. > > (See attached file: connection.cpp)(See attached file: connection.h)(See > attached file: job.cpp) > > Tested against PG 9.1.4, all seems fine, success/failure reported correctly > even when multiple jobs ran concurrently. Thanks - but can you provide the changes as a diff please? Otherwise it's much harder to properly review. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] pgAgent reports failure upon success
Apologies wrong files attached! It is Monday after all... ;o)(See attached file: connection.cpp.patch)(See attached file: connection.h.patch)(See attached file: job.cpp.patch)CheersDave Page wrote on 09/07/2012 10:16:47:> From: Dave Page > To: Martin French , > Cc: pgadmin-support@postgresql.org, pgadmin-support-ow...@postgresql.org> Date: 09/07/2012 10:16> Subject: Re: [pgadmin-support] pgAgent reports failure upon success> > Hi> > On Mon, Jul 9, 2012 at 10:11 AM, Martin French> wrote:> > Proposed patch for this bug in attached files.> >> > (See attached file: connection.cpp)(See attached file: connection.h)(See> > attached file: job.cpp)> >> > Tested against PG 9.1.4, all seems fine, success/failure reported correctly> > even when multiple jobs ran concurrently.> > Thanks - but can you provide the changes as a diff please? Otherwise> it's much harder to properly review.> > -- > Dave Page> Blog: http://pgsnake.blogspot.com> Twitter: @pgsnake> > EnterpriseDB UK: http://www.enterprisedb.com> The Enterprise PostgreSQL Company> = 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: i...@romaxtech.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. = job.cpp.patch Description: Binary data connection.h.patch Description: Binary data connection.cpp.patch Description: Binary data -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] pgAgent reports failure upon success
Tree Diff. diff -r pgAgent-3.2.1-Source pgAgent-3.2.2-Sourcediff -r pgAgent-3.2.1-Source/connection.cpp pgAgent-3.2.2-Source/connection.cpp28a29> lastStatus = 0;339a341> {340a343,344> conn->SetLastResult(0);> }344a349> conn->SetLastResult(-1);349a355> {351c357,358<---> conn->SetLastResult(-1);> }diff -r pgAgent-3.2.1-Source/include/connection.h pgAgent-3.2.2-Source/include/connection.h54c54,61<---> void SetLastResult(signed int result )> {> lastStatus = result;> }> int GetLastResult()> {> return lastStatus;> }72a80> signed int lastStatus;diff -r pgAgent-3.2.1-Source/job.cpp pgAgent-3.2.2-Source/job.cpp140c140< rc = stepConn->ExecuteVoid(steps->GetString(wxT("jstcode")));---> stepConn->ExecuteVoid(steps->GetString(wxT("jstcode")));141a142> rc = stepConn->GetLastResult();= 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: i...@romaxtech.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. =
[pgadmin-support] Create or Update Function
I've got a script to update the schema on a number of servers. These servers are at various versions of the schema, so I used the following syntax for each function, not knowing if it needed to be created or merely updated: CREATE OR REPLACE FUNCTION foo() . But I get the error, "function foo() does not exist" if it indeed does not exist. Shouldn't the "create or replace" just create it in this instance? Why the error? Thanks, Steve Erickson Senior Developer 266 East 7th Street, Floor 4 Saint Paul, MN 55101 651.925.3237 office 612.242.1343 cell NOTICE: This email, including any attachments, is covered by the Electronic Communications Privacy Act, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify our office by return email or at our telephone number (651) 925-3200. Then delete and destroy all copies of this email and any attachments. Thank you.
Re: [pgadmin-support] Create or Update Function
On 07/10/2012 04:28 AM, Steve Erickson wrote: I've got a script to update the schema on a number of servers. These servers are at various versions of the schema, so I used the following syntax for each function, not knowing if it needed to be created or merely updated: CREATE OR REPLACE FUNCTION foo() ... But I get the error, "function foo() does not exist" if it indeed does not exist. Shouldn't the "create or replace" just create it in this instance? Why the error? I think you need to show us the full conversation with the server. I suspect the CREATE OR REPLACE is failing because of bad function syntax or similar, so a following invocation of the function is causing your function foo() does not exist error. -- Craig Ringer