Re: [pgadmin-support] Small request - Graphical query builder controls

2012-01-07 Thread Guillaume Lelarge
On Tue, 2011-08-23 at 22:28 +0200, Guillaume Lelarge wrote:
> On Tue, 2011-08-23 at 04:02 -0400, Colin Beckingham wrote:
> > Using 1.12.3
> > 
> > On open the graphical query builder, leftmost directory panel opens with 
> > database as main item and Catalogs and Schemas as sub-items.
> > 
> > On click the + control for schemas to open that item "public" appears, 
> > but the + control for public does not appear until you double click it. 
> > After the double click you can open public and get to the tables and 
> > indexes and so on.
> > 
> > It would be helpful if on click the + of schemas that when sub-items are 
> > displayed that the + control would automatically be added.
> > 
> > The same behaviour would apply to Catalogs.
> 
> This is something I would like to see happen for the next release. Added
> on my TODO list.
> 

This is finally done. Will be available in 1.16.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
PostgreSQL Sessions #3: http://www.postgresql-sessions.org


-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support


Re: [pgadmin-support] Column not wide enough for data

2012-01-07 Thread Basil Bourque

  I expanded the column and discovered the
 actual count 

 Is there a way to tell
 PgAdmin to expand the column to fit the data? 
>>> 
>>> No, there's no such option. If you resize the column afterwards, and
>>> then rerun the query, it'll keep the new column size. But right now,
>>> it's not smart enough to guess the width of the column. I suppose we
>>> don't do it yet because it would take a long time to do if you have a
>>> big number of rows and/or a big number of columns. We should probably
>>> revisit that.

>> I understand the problem that a large number of rows imposes on sizing 
>> the column to fit the data.  Here is an alternative that is much easier 
>> to implement.  By default, PgAdmin appears to allocate a fixed, equal 
>> column width to all columns.  If the total width of all columns is less 
>> than the display window, then divide the display window width by the 
>> number of columns, and apply that equal width to all columns.  So if a 
>> query produces a small number of columns, then they can be sized to fill 
>> the display window.  In my case, with only a count result, the one 
>> column would fill the entire width.
> 
> That's an interesting idea. Not sure how much helpful wxWidgets will be
> with your idea, but it will be easy to check.

Another approach taken by other tools is to scan a small number of the rows to 
find the widest value. Say, the first 10 or 200 rows. Or whatever number seems 
reasonable.

--Basil Bourque


-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support