Re: where are the query output tuples stored

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Qiqi YU <vonclemay(at)gmail(dot)com>
Cc: rod(at)iol(dot)ie, Pgadmin-Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: where are the query output tuples stored
Date: 2011-03-14 15:57:49
Message-ID: AANLkTi=x7YV1-D-FhzCEng=zR=ZQ_-FeKtrmODU-TPWt@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Mon, Mar 14, 2011 at 2:39 PM, Qiqi YU <vonclemay(at)gmail(dot)com> wrote:
> Hi Dave,
>
> Thanks for your fast reply. As I went through the code of function
> ctlSQLResult::DisplayData(bool single), there seems to be no calling
> of wxGrid Control to display data?  My understanding is that the
> displayData function would set up the frame of the outputs (i.e. all
> the column attributes name and row number). But where is the output
> data being inserted into the output table?

It's not - you've got it backwards. The grid control calls
sqlResultTable::GetValue() whenever it wants to render a cell. That
function returns the text to display.

> Also the thing is I need to create to new tuples to the output panel
> (appended to the existing output table). Which part of the codes
> should I modify in order to achieve this?

You'd need to modify sqlResultTable::GetValue() to give it the ability
to return the additional data, and sqlResultTable::GetNumberRows() to
return the right number of rows. It will be somewhat difficult though
as the code is designed to be able to show partial resultsets - that
is it may start returning rows for the grid to display before the
entire recordset has been transferred from the server.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Vladimir Kokovic 2011-03-14 17:35:09 Copy/Cut/Paste Schema/Table
Previous Message Qiqi YU 2011-03-14 14:39:44 Re: where are the query output tuples stored