1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-20 15:22:23 +03:00

Make pg_relation_size() and friends return NULL if the object doesn't exist.

That avoids errors when the functions are used in queries like "SELECT
pg_relation_size(oid) FROM pg_class", and a table is dropped concurrently.

Phil Sorber
This commit is contained in:
Heikki Linnakangas
2012-01-19 13:06:30 +02:00
parent 6f6b46c9c0
commit fa352d662e
2 changed files with 89 additions and 35 deletions

View File

@ -14979,6 +14979,11 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
the table name.
</para>
<para>
If an OID that does not represent an existing object is passed as
argument to one of the above functions, NULL is returned.
</para>
<para>
The functions shown in <xref linkend="functions-admin-dblocation"> assist
in identifying the specific disk files associated with database objects.