From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Mickael Deloison <mdeloison(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: [pgScript patch] Output + bug fix |
Date: | 2009-03-06 22:51:33 |
Message-ID: | 937d27e10903061451i7c437312y192034372d22d962@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Sorry - I meant some pgScript code that would create a message so i
can figure out where it gets lost.
On 3/6/09, Mickael Deloison <mdeloison(at)gmail(dot)com> wrote:
> 2009/3/6 Dave Page <dpage(at)pgadmin(dot)org>:
>> 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.
>>
>
> Here is the code you requested, I removed the useless parts:
>
> pgQueryThread thread(m_app->connection(), stmt);
>
> if (thread.Create() == wxTHREAD_NO_ERROR)
> {
> if (thread.Run() == wxTHREAD_NO_ERROR)
> {
> // ...
> }
>
> if (thread.ReturnCode() != PGRES_COMMAND_OK
> && thread.ReturnCode() != PGRES_TUPLES_OK)
> {
> // ...
> wxString message(stmt + wxT("\n") +
> --> thread.GetMessagesAndClear().Strip(wxString::both));
> // ...
> (*m_cout) << message << wxT("\n");
> // ...
> }
>
>
> Now, I always have nothing when I call GetMessagesAndClear().
>
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Mickael Deloison | 2009-03-06 22:54:02 | Re: [pgScript patch] Output + bug fix |
Previous Message | Mickael Deloison | 2009-03-06 22:37:54 | Re: [pgScript patch] Output + bug fix |