diff options
| author | Daniel Gustafsson | 2026-09-15 11:46:52 +0000 |
|---|---|---|
| committer | Daniel Gustafsson | 2026-09-15 11:46:52 +0000 |
| commit | 3d2e8573e9cb91bd2b545184f4f9b326d237bcd1 (patch) | |
| tree | 1a05345c274cb2f249b08346191f2bec221748b4 | |
| parent | 6567f3f1f21353b5b0e9538d058998ab76c5a37c (diff) | |
doc: Database and tablespace size functions throws error
Commit b6463ea6ef3e46 added an explicit ereport on missing object
to pg_database_size and pg_tablespace_size, but the documentation
wasn't updated to match.
Author: Zhong ShiHao <zhong950419@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: solai v <solai.cdac@gmail.com>
Discussion: https://postgr.es/m/CAGRkXqQSegqDnkRf344G=80mJMn78o9u=auHnx=u1jf=XpuE0A@mail.gmail.com
Backpatch-through: 18
| -rw-r--r-- | doc/src/sgml/func.sgml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b57f161f53c..d065b8be1e1 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -30043,7 +30043,9 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset or understanding of usage results. <literal>bigint</literal> results are measured in bytes. If an OID that does not represent an existing object is passed to one of these - functions, <literal>NULL</literal> is returned. + functions, <literal>NULL</literal> is returned, except for + <function>pg_database_size</function> and + <function>pg_tablespace_size</function>, which raise an error. </para> <table id="functions-admin-dbsize"> @@ -30125,7 +30127,8 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset name or OID. To use this function, you must have <literal>CONNECT</literal> privilege on the specified database (which is granted by default) or have privileges of - the <literal>pg_read_all_stats</literal> role. + the <literal>pg_read_all_stats</literal> role. Throws an error if the + database does not exist. </para></entry> </row> @@ -30258,7 +30261,8 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset specified name or OID. To use this function, you must have <literal>CREATE</literal> privilege on the specified tablespace or have privileges of the <literal>pg_read_all_stats</literal> role, - unless it is the default tablespace for the current database. + unless it is the default tablespace for the current database. Throws + an error if the tablespace does not exist. </para></entry> </row> |
