From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Watzinger, Alexander <Alexander.Watzinger@oeaw.ac.at>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Support for dates before 4713 BC
Date: Mon, 12 Sep 2022 11:00:13 -0400
Message-ID: <1622177.1662994813@sss.pgh.pa.us> (raw)
In-Reply-To: <CANbhV-F8mZzt0Xdc55XJPzHhy_27MsG_ZnRv_VY0OjdwyNDZaQ@mail.gmail.com>
References: <ca438ff8331c4e109aa1b75a130948ac@oeaw.ac.at>
<4161384.1661105052@sss.pgh.pa.us>
<CANbhV-F8mZzt0Xdc55XJPzHhy_27MsG_ZnRv_VY0OjdwyNDZaQ@mail.gmail.com>
Simon Riggs <simon.riggs@enterprisedb.com> writes:
> On Sun, 21 Aug 2022 at 19:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> There are existing equations for calculating Gregorian month/day/year from
>> Julian day count [1]. They work back to Julian day zero, at least if
>> you grant that proleptic Gregorian dates are sensible that far back.
>> Nobody around here has looked into whether they'd work for negative Julian
>> day numbers (I suspect not though, at least not without work that seems
>> rather pointless).
> Sounds reasonable. So the 4713BC limit applies because of the
> resolution of 1 day.
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.
I'm still failing to see the point though. As already discussed upthread,
the SQL datetime types aren't very suitable for dealing with approximate
dates, multiple calendars, etc.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon.riggs@enterprisedb.com, Alexander.Watzinger@oeaw.ac.at, pgsql-general@lists.postgresql.org
Subject: Re: Support for dates before 4713 BC
In-Reply-To: <1622177.1662994813@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox