Re: Summing of INTERVAL returns incorrect number of days and hours

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Milan Novotny <xnovm149@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-04-01T14:19:36Z
Lists: 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