1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Add support for unit "B" to pg_size_bytes()

This makes it consistent with the units support in GUC.

Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/0106914a-9eb5-22be-40d8-652cc88c827d%40enterprisedb.com
This commit is contained in:
Peter Eisentraut
2023-03-07 20:26:29 +01:00
parent af4d5715fc
commit ce1215d9b0
4 changed files with 42 additions and 13 deletions

View File

@ -27167,7 +27167,10 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
</para>
<para>
Converts a size in human-readable format (as returned
by <function>pg_size_pretty</function>) into bytes.
by <function>pg_size_pretty</function>) into bytes. Valid units are
<literal>bytes</literal>, <literal>B</literal>, <literal>kB</literal>,
<literal>MB</literal>, <literal>GB</literal>, <literal>TB</literal>,
and <literal>PB</literal>.
</para></entry>
</row>