Re: dbsize patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: dbsize patch
Date
Msg-id 20181.1106839825@sss.pgh.pa.us
Whole thread Raw
In response to Re: dbsize patch  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: dbsize patch
List pgsql-patches
Andreas Pflug <pgadmin@pse-consulting.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

pgsql-patches by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: dbsize patch
Next
From: "Ed L."
Date:
Subject: Re: dbsize patch