Re: [pgScript patch] Output + bug fix

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Mickael Deloison <mdeloison(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: [pgScript patch] Output + bug fix
Date: 2009-03-06 20:21:48
Message-ID: 937d27e10903061221q429da5fdv74e70032a0a64266@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, Mar 6, 2009 at 7:31 PM, Mickael Deloison <mdeloison(at)gmail(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2009-03-06 21:41:01 Re: Greenplum patch for pgAdmin
Previous Message Mickael Deloison 2009-03-06 19:31:25 [pgScript patch] Output + bug fix