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

From Dave Page
Subject Re: [pgScript patch] Output + bug fix
Date
Msg-id 937d27e10903070059o4d3f3330nd533d78820322c5a@mail.gmail.com
Whole thread Raw
In response to Re: [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
I meant 'code written in pgScript' that would exercise that c++
codepath, but i think i can work something out from your description
:)

On 3/6/09, Mickael Deloison <mdeloison@gmail.com> wrote:
> 2009/3/6 Dave Page <dpage@pgadmin.org>:
>> Sorry - I meant some pgScript code that would create a message so i
>> can figure out where it gets lost.
>>> 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");
>>>               // ...
>>>       }
>
> This was pgScript code. It's in
> pgadmin/pgscript/expressions/pgsExecute.cpp. This is the expression
> that executes a query: it displays the warning if the return code was
> not PGRES_COMMAND_OK or PGRES_TUPLES_OK.
>


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

pgadmin-hackers by date:

Previous
From: Mickael Deloison
Date:
Subject: Re: [pgScript patch] Output + bug fix
Next
From: Mickael Deloison
Date:
Subject: Re: [pgScript patch] Output + bug fix