Re: Column not wide enough for data

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Guy Rouillier <guyr(at)burntmail(dot)com>
Cc: PgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Column not wide enough for data
Date: 2012-01-02 21:40:57
Message-ID: 1325540457.17079.24.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Tue, 2011-12-20 at 22:29 -0500, Guy Rouillier wrote:
> I wanted to copy a table to another table, so I started by getting a
> count of the rows in the source table. The result of "select count(*)
> from xxxx" came out like this:
>
> count
> bigint
> ------
> 26569
>
> Based on that, I concluded that a straightforward "insert into yyyy
> select * from xxxx" would suffice and be done in no time. So I started
> running that and then went on to something else.
>
> About an hour and a half later, I realized that query was still running.
> I thought that can't be right, so I cancelled the operation and
> reissued the count. This time, I expanded the column and discovered the
> actual count was
>
> count
> bigint
> ------
> 26569440
>
> Since this count query produced a single column result, there is plenty
> of room to expand the column on initial display. Is there a way to tell
> PgAdmin to expand the column to fit the data? I could not find such an
> option.
>

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.

And sorry for the late answer.

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-01-02 21:57:34 Re: CREATE CONSTRAINT TRIGGER in SQL pane (pgAdmin 1.14.1)
Previous Message Guillaume Lelarge 2012-01-02 21:37:56 Re: Tables stat refresh error