From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add pg_size_bytes() to parse human-readable size strings.
Date: Sat, 20 Feb 2016 10:07:05 +0000
Message-ID: <E1aX4RN-00011i-So@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Add pg_size_bytes() to parse human-readable size strings.
This will parse strings in the format produced by pg_size_pretty() and
return sizes in bytes. This allows queries to be written with clauses
like "pg_total_relation_size(oid) > pg_size_bytes('10 GB')".
Author: Pavel Stehule with various improvements by Vitaly Burovoy
Discussion: http://www.postgresql.org/message-id/CAFj8pRD-tGoDKnxdYgECzA4On01_uRqPrwF-8LdkSE-6bDHp0w@mail.gmail....
Reviewed-by: Vitaly Burovoy, Oleksandr Shulgin, Kyotaro Horiguchi,
Michael Paquier and Robert Haas
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/53874c5228fe16589a4d01b3e1fab3678e0fd8e3
Modified Files
--------------
doc/src/sgml/func.sgml | 32 +++++++-
src/backend/utils/adt/dbsize.c | 149 +++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +
src/include/utils/builtins.h | 1 +
src/test/regress/expected/dbsize.out | 109 +++++++++++++++++++++++++
src/test/regress/sql/dbsize.sql | 39 +++++++++
7 files changed, 331 insertions(+), 3 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: dean.a.rasheed@gmail.com
Subject: Re: pgsql: Add pg_size_bytes() to parse human-readable size strings.
In-Reply-To: <E1aX4RN-00011i-So@gemulon.postgresql.org>
References: <E1aX4RN-00011i-So@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox