Re: [DOC] pg_database_size/pg_tablespace_size error on a missing OID - Mailing list pgsql-hackers

From Chao Li
Subject Re: [DOC] pg_database_size/pg_tablespace_size error on a missing OID
Date
Msg-id 24B11965-8544-4EAE-8BE9-5C5441F288A1@gmail.com
Whole thread
List pgsql-hackers

> On Sep 5, 2026, at 21:11, shihao zhong <zhong950419@gmail.com> wrote:
>
> 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
> <0001-doc-note-that-pg_database_size-and-pg_tablespace_siz.patch>


The change overall looks good to me. One nitpick:
```
+    functions, <literal>NULL</literal> is returned, except by
```

“Except by” sounds uncommon, is “expect for” better?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remove toast_max_chunk_size from control file
Next
From: Ayoub Kazar
Date:
Subject: Re: Add pg_stat_vfdcache view for VFD cache statistics