Re: [HACKERS] psql \dt and table size

2011-04-08 Thread Robert Haas
On Thu, Apr 7, 2011 at 3:03 PM, Bernd Helmle wrote: > --On 28. März 2011 13:38:23 +0100 Bernd Helmle wrote: >>> But I think we can just call pg_table_size() regardless in 9.0+; I >>> believe it'll return the same results as pg_relation_size() on >>> non-tables.  Anyone see a problem with that? >>

Re: [HACKERS] psql \dt and table size

2011-04-07 Thread Bernd Helmle
--On 28. März 2011 13:38:23 +0100 Bernd Helmle wrote: But I think we can just call pg_table_size() regardless in 9.0+; I believe it'll return the same results as pg_relation_size() on non-tables. Anyone see a problem with that? Hmm yeah, seems i was thinking too complicated...here is a cle

Re: [HACKERS] psql \dt and table size

2011-03-28 Thread Bernd Helmle
--On 26. März 2011 21:59:18 -0400 Robert Haas wrote: But I think we can just call pg_table_size() regardless in 9.0+; I believe it'll return the same results as pg_relation_size() on non-tables. Anyone see a problem with that? Hmm yeah, seems i was thinking too complicated...here is a cl

Re: [HACKERS] psql \dt and table size

2011-03-26 Thread Robert Haas
On Sat, Mar 26, 2011 at 9:42 PM, Robert Haas wrote: > On Wed, Mar 23, 2011 at 4:33 PM, Alvaro Herrera > wrote: >> Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: >>> On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: >>> > It stroke me today again, that \dt+ isn't displa

Re: [HACKERS] psql \dt and table size

2011-03-26 Thread Robert Haas
On Wed, Mar 23, 2011 at 4:33 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: >> On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: >> > It stroke me today again, that \dt+ isn't displaying the acurate table size >> > for tables, since it uses p

Re: [HACKERS] psql \dt and table size

2011-03-25 Thread Pavel Stehule
2011/3/25 Alvaro Herrera : > Excerpts from Pavel Stehule's message of vie mar 25 02:48:49 -0300 2011: >> 2011/3/24 Robert Haas : >> > On Wed, Mar 23, 2011 at 4:50 PM, Pavel Stehule >> > wrote: > >> >> can we enhance a detail for table and show more accurate numbers? >> >> >> >> table size: xxx >>

Re: [HACKERS] psql \dt and table size

2011-03-25 Thread Alvaro Herrera
Excerpts from Pavel Stehule's message of vie mar 25 02:48:49 -0300 2011: > 2011/3/24 Robert Haas : > > On Wed, Mar 23, 2011 at 4:50 PM, Pavel Stehule > > wrote: > >> can we enhance a detail for table and show more accurate numbers? > >> > >> table size: xxx > >> toast size: xxx > >> indexes size

Re: [HACKERS] psql \dt and table size

2011-03-24 Thread Pavel Stehule
2011/3/24 Robert Haas : > On Wed, Mar 23, 2011 at 4:50 PM, Pavel Stehule > wrote: >> 2011/3/23 Alvaro Herrera : >>> Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: > It stroke me today again, that \dt+ isn't di

Re: [HACKERS] psql \dt and table size

2011-03-24 Thread Robert Haas
On Wed, Mar 23, 2011 at 4:50 PM, Pavel Stehule wrote: > 2011/3/23 Alvaro Herrera : >> Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: >>> On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: >>> > It stroke me today again, that \dt+ isn't displaying the acurate table >>> >

Re: [HACKERS] psql \dt and table size

2011-03-23 Thread Pavel Stehule
2011/3/23 Alvaro Herrera : > Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: >> On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: >> > It stroke me today again, that \dt+ isn't displaying the acurate table size >> > for tables, since it uses pg_relation_size() till now. W

Re: [HACKERS] psql \dt and table size

2011-03-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié mar 23 17:24:59 -0300 2011: > On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: > > It stroke me today again, that \dt+ isn't displaying the acurate table size > > for tables, since it uses pg_relation_size() till now. With having > > pg_table_size() s

Re: [HACKERS] psql \dt and table size

2011-03-23 Thread Robert Haas
On Mon, Mar 21, 2011 at 1:44 PM, Bernd Helmle wrote: > It stroke me today again, that \dt+ isn't displaying the acurate table size > for tables, since it uses pg_relation_size() till now. With having > pg_table_size() since PostgreSQL 9.0 available, i believe it would be more > useful to have the

Re: [HACKERS] psql \dt and table size

2011-03-23 Thread Susanne Ebrecht
Hello Bernd, On 21.03.2011 18:44, Bernd Helmle wrote: Attached minor patch extends \dt to use pg_table_size() starting with PostgreSQL 9.0, not sure if we backport such changes though. It would be interesting for 9.1, however. As I already told you: I tested and it worked. The code looks

Re: [HACKERS] psql \dt and table size

2011-03-22 Thread Cédric Villemain
2011/3/22 David Fetter : > +1 for fixing this behavior in 9.1.  -1 for changing in 9.0, as the > change in behavior mid-release will cause more confusion than the > incomplete accounting does. Idem. > > Cheers, > David. > On Mon, Mar 21, 2011 at 06:44:51PM +0100, Bernd Helmle wrote: >> It stroke

Re: [HACKERS] psql \dt and table size

2011-03-21 Thread David Fetter
+1 for fixing this behavior in 9.1. -1 for changing in 9.0, as the change in behavior mid-release will cause more confusion than the incomplete accounting does. Cheers, David. On Mon, Mar 21, 2011 at 06:44:51PM +0100, Bernd Helmle wrote: > It stroke me today again, that \dt+ isn't displaying the

[HACKERS] psql \dt and table size

2011-03-21 Thread Bernd Helmle
It stroke me today again, that \dt+ isn't displaying the acurate table size for tables, since it uses pg_relation_size() till now. With having pg_table_size() since PostgreSQL 9.0 available, i believe it would be more useful to have the total acquired storage displayed, including implicit objec