aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/dbsize.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-05-03 10:52:25 -0400
committerRobert Haas <rhaas@postgresql.org>2016-05-03 10:52:25 -0400
commit8826d850781cb328482c8f92af2a3d93385cd63b (patch)
tree4fe1529d761610370259c5c8e3eab74b869c956b /src/backend/utils/adt/dbsize.c
parent1e77949e67b94af4d2a350c6dac9109419932608 (diff)
downloadpostgresql-8826d850781cb328482c8f92af2a3d93385cd63b.tar.gz
postgresql-8826d850781cb328482c8f92af2a3d93385cd63b.zip
Tweak a few more things in preparation for upcoming pgindent run.
These adjustments adjust code and comments in minor ways to prevent pgindent from mangling them. Among other things, I tried to avoid situations where pgindent would emit "a +b" instead of "a + b", and I tried to avoid having it break up inline comments across multiple lines.
Diffstat (limited to 'src/backend/utils/adt/dbsize.c')
-rw-r--r--src/backend/utils/adt/dbsize.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index 1db4acf175e..4ec2fed2b35 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -817,11 +817,14 @@ pg_size_bytes(PG_FUNCTION_ARGS)
else if (pg_strcasecmp(strptr, "kb") == 0)
multiplier = (int64) 1024;
else if (pg_strcasecmp(strptr, "mb") == 0)
- multiplier = (int64) 1024 * 1024;
+ multiplier = ((int64) 1024) * 1024;
+
else if (pg_strcasecmp(strptr, "gb") == 0)
- multiplier = (int64) 1024 * 1024 * 1024;
+ multiplier = ((int64) 1024) * 1024 * 1024;
+
else if (pg_strcasecmp(strptr, "tb") == 0)
- multiplier = (int64) 1024 * 1024 * 1024 * 1024;
+ multiplier = ((int64) 1024) * 1024 * 1024 * 1024;
+
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),