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

Re: dbsize patch

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: dbsize patch
Date: 2005-01-28 11:22:55
Message-ID: 41FA208F.1070704@pse-consulting.de (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> 
>>Hm, these are all implementable as SQL functions, do we need these hard 
>>coded too?
> 
> 
>>e.g.
>>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'
> 
> 
> Your suggestion would be more compelling if the example were correct ;-).
> Consider more than one index on the same table.

Hopefully SUM() will do the job.

Regards,
Andreas

In response to

pgsql-patches by date

Next:From: Stephen FrostDate: 2005-01-28 13:48:37
Subject: Re: [PATCHES] Merge pg_shadow && pg_group -- UNTESTED
Previous:From: Michael PaesoldDate: 2005-01-28 10:33:29
Subject: Re: Continue transactions after errors in psql

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