From: Tom Lane Date: Fri, 9 May 2014 01:45:02 +0000 (-0400) Subject: Document permissions needed for pg_database_size and pg_tablespace_size. X-Git-Tag: REL9_1_14~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb837d75fa30e785af01c1e627e1cae9ba28e424;p=postgresql 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. --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index dff45afe33..68117a7114 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -14486,7 +14486,11 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup()); pg_database_size and 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 pg_database_size, + you must have CONNECT permission on the specified database + (which is granted by default). To use pg_tablespace_size, + you must have CREATE permission on the specified tablespace, + unless it is the default tablespace for the current database.