Nathan Bossart <nathandboss...@gmail.com> writes: > On Sun, Jun 09, 2024 at 09:57:54PM -0400, Tom Lane wrote: >> I think you could replace the whole thing by using overflow-aware >> multiplication and addition primitives in the result calculation.
> I was still confused by the comment about 1999, but I tracked it down to > commit 542eeba [0]. IIUC it literally means that we need special handling > for that date because POSTGRES_EPOCH_JDATE is 2000-01-01. Yeah, I think so, and I think we probably don't need any special care if we switch to direct tests of overflow-aware primitives. (Though it'd be worth checking that '1999-12-31 24:00:00'::timestamp still works. It doesn't look like I actually added a test case for that.) regards, tom lane