Re: Summing of INTERVAL returns incorrect number of days and hours - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Summing of INTERVAL returns incorrect number of days and hours
Date
Msg-id 346945.1743517176@sss.pgh.pa.us
Whole thread Raw
In response to Summing of INTERVAL returns incorrect number of days and hours  (Milan Novotny <xnovm149@gmail.com>)
List pgsql-bugs
Milan Novotny <xnovm149@gmail.com> writes:
> 581 days 61:06:36.805|
> --> should be 583 days ..

If you don't like that result, justify_hours() might help you.
But interval summing doesn't assume that it can always overflow
seconds into days, because a day isn't always 24 hours.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Milan Novotny
Date:
Subject: Summing of INTERVAL returns incorrect number of days and hours
Next
From: PG Bug reporting form
Date:
Subject: BUG #18874: CVE-2024-4317