aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-08 21:45:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-08 21:45:14 -0400
commit5c6d3e405ff533a9d52ae3c24eddda09e0ae1a68 (patch)
treed41c21b031e56af5d9294021f8ba1558609efb6c
parent40d6f6a30f7fbb13e3709c0bbe443ffa1db0241f (diff)
downloadpostgresql-5c6d3e405ff533a9d52ae3c24eddda09e0ae1a68.tar.gz
postgresql-5c6d3e405ff533a9d52ae3c24eddda09e0ae1a68.zip
Document permissions needed for pg_database_size and pg_tablespace_size.
Back in 8.3, we installed permissions checks in these functions (see commits 8bc225e7990a and cc26599b7206). But we forgot to document that anywhere in the user-facing docs; it did get mentioned in the 8.3 release notes, but nobody's looking at that any more. Per gripe from Suya Huang.
-rw-r--r--doc/src/sgml/func.sgml6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 9ea7c035e4f..3c7cf7b5e63 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -15695,7 +15695,11 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<para>
<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.
+ 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). 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>
<para>