Re: Support for dates before 4713 BC

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: stefan eichert <stefaneichert(at)gmail(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-08-22 10:42:47
Message-ID: 20220822104247.buetqd6fbye3s5cc@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Stefan, Alexander,

On 2022-Aug-22, stefan eichert wrote:

> I can also fully support what Alex has written. I am an archaeologist at
> the Natural History Museum Vienna and PostgreSQL is a perfect Open Source
> software and we really love working with it for our archaeological and
> (pre)historical projects.
> [...]

This made me remember the stuff genealogists use -- a complex datatype
that encodes not just some number on a specific calendar, but also a
"quality" marker (precise, calculated, estimated) as well as a calendar
identifier (Gregorian, Islamic, Hebrew etc). For example, GRAMPS has
this:
https://github.com/gramps-project/gramps/blob/master/gramps/gen/lib/date.py#L531
I'm not familiar with the details, but skimming through that source
might give you some ideas.

Judging from your description and Alexander's, it sounds like you should
dedicate some time to developing a specification for a complex datatype
to use with archaeological or what have you. I suppose you would want
to store type of date it is, its precision, the value itself, a degree
of fuzziness, and maybe some other properties that you know better than
I do. Then get someone to implement an open source custom datatype
based on that spec, which everybody then uses.

Using "regular" calendars is unlikely to be a good match.

--
Álvaro Herrera

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Browder 2022-08-22 10:59:14 Re: Support for dates before 4713 BC
Previous Message jian he 2022-08-22 10:23:58 Re: Creating constraint dynamically