Re: [pgScript patch] Output + bug fix - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [pgScript patch] Output + bug fix
Date
Msg-id 937d27e10903061221q429da5fdv74e70032a0a64266@mail.gmail.com
Whole thread Raw
In response to [pgScript patch] Output + bug fix  (Mickael Deloison <mdeloison@gmail.com>)
Responses Re: [pgScript patch] Output + bug fix  (Mickael Deloison <mdeloison@gmail.com>)
List pgadmin-hackers
On Fri, Mar 6, 2009 at 7:31 PM, Mickael Deloison <mdeloison@gmail.com> wrote:
> Hi pgAdmin hackers,
>
> Here is a patch for pgAdmin. I have finally completed the patch for
> the pgScript outputs and am sorry for the delay.
> This patch also corrects a bug in pgsPrintStmt.cpp because of a thread
> double lock in case of exception.
> I have other updates to send but I would like this one to be committed first.

Please be quick - I want to get the first beta out early next week.

Magnus; can you review the patch please? You're already familiar with pgScript.

> I have noticed while making this patch that the
> pgQueryThread::GetMessagesAndClear() method does not return anything
> when my query returns a warning. It did before.
> The line 185 is:
>  conn->SetLastResultError(NULL);
> Before, it was:
>  appendMessage(conn->GetLastError() + wxT("\n"));
> When I put this line back to what it was, I do not have the problem
> anymore. Is this a problem or is there another way to get the last
> warning message?

There were some cases where error messages would be lost, and part of
the fix was to try to make errors all go through SetLastResultError()
for consistency in output. I modified SetLastResultError() so that if
it's passed NULL, it gets the message via: lastResultError.msg_primary
= GetLastError(); instead, so it /should/ get the same message.

Can you supply an example of how to trigger the warning please? I
assume it's a pgScript thing, as I get notices and errors from the
backend just fine.




--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

pgadmin-hackers by date:

Previous
From: Mickael Deloison
Date:
Subject: [pgScript patch] Output + bug fix
Next
From: Chuck McDevitt
Date:
Subject: Re: Greenplum patch for pgAdmin