aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/timestamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/timestamp.c')
-rw-r--r--src/backend/utils/adt/timestamp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 9799647e1a5..d8552a1f186 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -3290,7 +3290,7 @@ interval_mul(PG_FUNCTION_ARGS)
* cascade from months and days. It might still be >24 if the combination
* of cascade and the seconds factor operation itself.
*/
- if (Abs(sec_remainder) >= SECS_PER_DAY)
+ if (fabs(sec_remainder) >= SECS_PER_DAY)
{
result->day += (int) (sec_remainder / SECS_PER_DAY);
sec_remainder -= (int) (sec_remainder / SECS_PER_DAY) * SECS_PER_DAY;
@@ -3347,7 +3347,7 @@ interval_div(PG_FUNCTION_ARGS)
sec_remainder = (orig_day / factor - result->day +
month_remainder_days - (int) month_remainder_days) * SECS_PER_DAY;
sec_remainder = TSROUND(sec_remainder);
- if (Abs(sec_remainder) >= SECS_PER_DAY)
+ if (fabs(sec_remainder) >= SECS_PER_DAY)
{
result->day += (int) (sec_remainder / SECS_PER_DAY);
sec_remainder -= (int) (sec_remainder / SECS_PER_DAY) * SECS_PER_DAY;