aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/dbsize.c
diff options
context:
space:
mode:
authorDean Rasheed <dean.a.rasheed@gmail.com>2016-02-20 11:03:04 +0000
committerDean Rasheed <dean.a.rasheed@gmail.com>2016-02-20 11:03:04 +0000
commitad7cc1c554980145b226a066afe56d9c777ce7ae (patch)
treee5269017adbc1353bbf7c86d70ab5dd3b46a4506 /src/backend/utils/adt/dbsize.c
parent53874c5228fe16589a4d01b3e1fab3678e0fd8e3 (diff)
downloadpostgresql-ad7cc1c554980145b226a066afe56d9c777ce7ae.tar.gz
postgresql-ad7cc1c554980145b226a066afe56d9c777ce7ae.zip
Fix pg_size_bytes() to be more portable.
Commit 53874c5228fe16589a4d01b3e1fab3678e0fd8e3 broke various 32-bit buildfarm machines because it incorrectly used an 'L' suffix for what needed to be a 64-bit literal. Thanks to Michael Paquier for helping to diagnose this.
Diffstat (limited to 'src/backend/utils/adt/dbsize.c')
-rw-r--r--src/backend/utils/adt/dbsize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index d1072d9ccd6..ba84c48cfd7 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -821,7 +821,7 @@ pg_size_bytes(PG_FUNCTION_ARGS)
else if (pg_strcasecmp(strptr, "gb") == 0)
multiplier = 1024 * 1024 * 1024;
else if (pg_strcasecmp(strptr, "tb") == 0)
- multiplier = 1024 * 1024 * 1024 * 1024L;
+ multiplier = 1024 * 1024 * 1024 * 1024LL;
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),