Re: Support for dates before 4713 BC

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Support for dates before 4713 BC
Дата
Msg-id 1622177.1662994813@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Support for dates before 4713 BC  (Simon Riggs <simon.riggs@enterprisedb.com>)
Ответы Re: Support for dates before 4713 BC
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Sebastien Flaesch
Дата:
Сообщение: Re: Resolving host to IP address
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Resolving host to IP address