Dave Page wrote:

The only remaining function that last week's brief discussion indicated
was required is a replacement for total_relation_size() (or
pg_table_size() as it might now be called). I didn't realise until a
few minutes ago that this function (which is actually broken because it
doesn't handle schemas) was only committed a couple of months ago
(v1.5,
http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dbsize/dbsize.sql.in) > and has therefore never been in a release version.

So should we include this new feature, and if so, how is it best added > - rewrite in C, or one long line in pg_proc?

IIRC the initially submitted patch for this contained a function written in C. It was only afterwards converted to SQL because of a comment by someone else. I will have a look in the archives.

What I would like to have is a function that returns the table size (+ toast) + indexes. If it would be called pg_table_size(), that would be ok. We should have one with oid and another with text.

Best Regards,
Michael Paesold

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to