From 0001e98d54f3d81c2ff413e4aec4933bd1378963 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 2 Aug 2005 16:11:57 +0000 Subject: Code and docs review for pg_column_size() patch. --- doc/src/sgml/func.sgml | 109 +++++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 44 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ba372618ac8..7dc9a3b5978 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -2206,14 +2206,6 @@ PostgreSQL documentation 5 - - pg_column_size(string) - integer - Number of bytes required to store the value, which might be compressed - pg_column_size('jo\\000se'::bytea) - 5 - - position(substring in string) integer @@ -9181,11 +9173,29 @@ SELECT set_config('log_statement_stats', 'off', false); - The functions shown in calculate the actual disk space - usage of database objects. + The functions shown in calculate + the actual disk space usage of database objects. + + pg_column_size + + + pg_tablespace_size + + + pg_database_size + + + pg_relation_size + + + pg_complete_relation_size + + + pg_size_pretty + + Database Object Size Functions @@ -9195,97 +9205,108 @@ SELECT set_config('log_statement_stats', 'off', false); + + pg_column_size(any) + integer + Number of bytes used to store a particular value (possibly compressed) + pg_tablespace_size(oid) - int8 - Calculates the total disk space used by the tablespace with the specified OID + bigint + Total disk space used by the tablespace with the specified OID pg_tablespace_size(name) - int8 - Calculates the total disk space used by the tablespace with the specified name + bigint + Total disk space used by the tablespace with the specified name pg_database_size(oid) - int8 - Calculates the total disk space used by the database with the specified OID + bigint + Total disk space used by the database with the specified OID pg_database_size(name) - int8 - Calculates the total disk space used by the database with the specified name + bigint + Total disk space used by the database with the specified name pg_relation_size(oid) - int8 - Calculates the disk space used by the table or index with the specified OID + bigint + Disk space used by the table or index with the specified OID pg_relation_size(text) - int8 - Calculates the disk space used by the index or table with the specified name. - The name may be prefixed with a schema name if required + bigint + Disk space used by the table or index with the specified name. + The name may be qualified with a schema name pg_complete_relation_size(oid) - int8 - Calculates the total disk space used by the table with the specified OID, + bigint + Total disk space used by the table with the specified OID, including indexes and toasted data pg_complete_relation_size(text) - int8 - Calculates the total disk space used by the table with the specified name, - including indexes and toasted data. The name may be prefixed with a schema name if - required + bigint + Total disk space used by the table with the specified name, + including indexes and toasted data. + The table name may be qualified with a schema name - pg_size_pretty(int8) + pg_size_pretty(bigint) text - Formats the size value (in bytes) into a human readable format with size units + Converts a size in bytes into a human-readable format with size units
- pg_tablespace_size and pg_database_size accept an - oid or name of a tablespace or database, and return the disk space usage of the specified object. + pg_column_size shows the space used to store any individual + data value. - - pg_relation_size - - pg_relation_size accepts the oid or name of a table, index or + pg_tablespace_size and pg_database_size accept + the OID or name of a tablespace or database, and return the total disk + space used therein. + + + + pg_relation_size accepts the OID or name of a table, index or toast table, and returns the size in bytes. + - pg_complete_relation_size accepts the oid or name of a table or - toast table, and returns the size in bytes of the data and all associated - indexes and toast tables. + pg_complete_relation_size accepts the OID or name of a table + or toast table, and returns the size in bytes of the data and all + associated indexes and toast tables. + - pg_size_pretty can be used to format the size of the - database objects in a human readable way, using kB, MB, GB or TB as appropriate. + pg_size_pretty can be used to format the result of one of + the other functions in a human-readable way, using kB, MB, GB or TB as + appropriate. -- cgit v1.2.3