Re: Remove dependence on integer wrapping
| От | Tom Lane |
|---|---|
| Тема | Re: Remove dependence on integer wrapping |
| Дата | |
| Msg-id | 626812.1717988598@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Remove dependence on integer wrapping (Nathan Bossart <nathandbossart@gmail.com>) |
| Список | pgsql-hackers |
Nathan Bossart <nathandbossart@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
В списке pgsql-hackers по дате отправления: