Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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
Twitter: @pgsnake

EnterpriseDB UK:
The Enterprise PostgreSQL Company

In response to


pgadmin-support by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group