Re: dbsize patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Neil Conway <neilc(at)samurai(dot)com>, "Ed L(dot)" <pgsql(at)bluepolka(dot)net>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: dbsize patch
Date: 2005-01-27 15:30:25
Message-ID: 20181.1106839825@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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.

This does raise the question of whether the C implementations count the
right things either --- I have not looked. Neil, I trust you're going
to review this and not just apply it?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ed L. 2005-01-27 15:42:51 Re: dbsize patch
Previous Message Andreas Pflug 2005-01-27 13:59:45 Re: dbsize patch