postgres.git / summary / log / commit / refs

commit    901202248ea465b2ffd77c4a5ec57d27908099dd
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Fri May 09 01:45:02 2014 +0000
First released in: 9.4.0, 8.4.22, 9.0.18, 9.1.14, 9.2.9, 9.3.5

    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.


doc/src/sgml/func.sgml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 8aa4d5fe7fe..3630ba6fc06 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -15090,7 +15090,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> [parent: 54055609e2d0]