Re: Support for dates before 4713 BC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: "Watzinger, Alexander" <Alexander(dot)Watzinger(at)oeaw(dot)ac(dot)at>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Support for dates before 4713 BC
Date: 2022-09-12 15:53:25
Message-ID: 1655012.1662998005@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> writes:
> On Mon, 12 Sept 2022 at 16:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> No, it applies because we aren't sure that the math would operate
>> correctly with negative Julian day numbers --- for instance, division
>> roundoffs might happen in the wrong direction. If somebody wanted to go
>> through and check/fix all that, we could probably relax the restriction.

> OK, challenge seems clear.

FWIW, I think this decision dates to a time when we still worried about
C89's lack of specificity about which direction integer division will
round negative results in. Now that we're targeting only C99-compliant
platforms, that part should be easier.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rama Krishnan 2022-09-12 16:34:02 Postgresql acid components
Previous Message Simon Riggs 2022-09-12 15:41:19 Re: Support for dates before 4713 BC