Skip to content

Commit ad7cc1c

Browse files
committed
Fix pg_size_bytes() to be more portable.
Commit 53874c5 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.
1 parent 53874c5 commit ad7cc1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/dbsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ pg_size_bytes(PG_FUNCTION_ARGS)
821821
else if (pg_strcasecmp(strptr, "gb") == 0)
822822
multiplier = 1024 * 1024 * 1024;
823823
else if (pg_strcasecmp(strptr, "tb") == 0)
824-
multiplier = 1024 * 1024 * 1024 * 1024L;
824+
multiplier = 1024 * 1024 * 1024 * 1024LL;
825825
else
826826
ereport(ERROR,
827827
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy