mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
Fix pg_size_bytes() to be more portable.
Commit 53874c5228
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.
This commit is contained in:
@ -821,7 +821,7 @@ pg_size_bytes(PG_FUNCTION_ARGS)
|
|||||||
else if (pg_strcasecmp(strptr, "gb") == 0)
|
else if (pg_strcasecmp(strptr, "gb") == 0)
|
||||||
multiplier = 1024 * 1024 * 1024;
|
multiplier = 1024 * 1024 * 1024;
|
||||||
else if (pg_strcasecmp(strptr, "tb") == 0)
|
else if (pg_strcasecmp(strptr, "tb") == 0)
|
||||||
multiplier = 1024 * 1024 * 1024 * 1024L;
|
multiplier = 1024 * 1024 * 1024 * 1024LL;
|
||||||
else
|
else
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
|
Reference in New Issue
Block a user