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

Re: dbsize patch

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>,pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: dbsize patch
Date: 2005-01-27 13:59:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Neil Conway wrote:
> On Tue, 2005-01-25 at 16:49 -0700, Ed L. wrote:
>>The attached dbsize patch:
>>	+ makes relation_size(relname) include toast tables;
>>	+ adds aggregate_relation_size(relname) to count table data and indices;
>>	+ adds indices_size(relname) to report the size of indices for a relation;

Hm, these are all implementable as SQL functions, do we need these hard 
coded too?

create function aggregate_relation_size(oid) returns int8 as $CODE$
select sum(pg_relation_size(indexrelid)) from pg_index where indrelid=$1;
$CODE$ language 'SQL'


In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2005-01-27 15:30:25
Subject: Re: dbsize patch
Previous:From: David FetterDate: 2005-01-27 10:28:09
Subject: Clarify use of NOW() in pl/pgsql docs

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