Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad7cc1c

Browse filesBrowse 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
Copy full SHA for ad7cc1c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/dbsize.c

Copy file name to clipboardExpand all lines: src/backend/utils/adt/dbsize.c
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.