Bruce Momjian wrote:
Andreas Pflug wrote:

Dave Page wrote:





-----Original Message-----
From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: 02 July 2005 21:30
To: Bruce Momjian
Cc: Dave Page; PostgreSQL-patches; PostgreSQL-development
Subject: Re: [PATCHES] Dbsize backend integration


Is a new version of this patch coming?


Yup, attached. Per our earlier conversation, pg_dbfile_size() now
returns the size of a table or index, and pg_relation_size() returns the
total size of a relation and all associated indexes and toast tables
etc.

pg_relation_size's name is quite unfortunate, since the 8.0 contrib function does something different. And pg_dbfile_size sounds misleading, suggesting it takes a filename or relfilenode as parameter.


Hmm.  I don't see how we can call it pg_table_size because people think
of tables and indexes, while relation has a more inclusive suggestion.

We could, taking the same logic as GRANT which uses the keyword TABLE for sequences and Indexes too, but it's certainly not favourable.

As far as pg_dbfile_size, do you have any other idea for a name?  To me,
it returns the size of the 'db file' associated with the
heap/index/toast.

How about pg_relation_size(oid, bool) with the second optional parameter to count all additional objects too (the 'total' flag).

Regards,
Andreas


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to