[DOC] pg_database_size/pg_tablespace_size error on a missing OID

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [DOC] pg_database_size/pg_tablespace_size error on a missing OID
Date: 2026-09-05 13:11:37
Message-ID: CAGRkXqQSegqDnkRf344G=80mJMn78o9u=auHnx=u1jf=XpuE0A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

The introduction to the database object size functions in
func-admin.sgml says that passing an OID that does not represent an
existing object returns NULL. That is true for the relation size
functions, but pg_database_size() and pg_tablespace_size() raise an
error for a nonexistent OID instead. The attached patch documents the
exception.

Thanks,
Shihao

Attachment Content-Type Size
0001-doc-note-that-pg_database_size-and-pg_tablespace_siz.patch application/octet-stream 1.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-09-05 13:15:13 Re: Archive-fed logical decoding: pausing recovery on slot conflict
Previous Message shihao zhong 2026-09-05 12:48:58 Re: [PATCH] pg_surgery: check the page header and line pointers