1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

doc: Database and tablespace size functions throws error

Commit b6463ea6ef 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
This commit is contained in:
Daniel Gustafsson
2026-09-15 13:46:52 +02:00
parent e7006ecaeb
commit 2874526137

View File

@@ -1536,7 +1536,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">
@@ -1618,7 +1620,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>
@@ -1751,7 +1754,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>