</para>
<para>
- <function>pg_database_size</function> accepts the OID or name of a database,
- and returns the total disk space used therein. To use the function,
+ <function>pg_database_size</function> and <function>pg_tablespace_size</>
+ accept the OID or name of a database or tablespace, and return the total
+ disk space used therein. To use <function>pg_database_size</function>,
you must have <literal>CONNECT</> permission on the specified database
- (which is granted by default).
- </para>
-
- <para>
- <function>pg_tablespace_size</> accepts the OID or name of a tablespace,
- and returns the total disk space used therein. To use the function,
+ (which is granted by default). To use <function>pg_tablespace_size</>,
you must have <literal>CREATE</> permission on the specified tablespace,
unless it is the default tablespace for the current database.
</para>