public inbox for [email protected]help / color / mirror / Atom feed
Re: Support for dates before 4713 BC 3+ messages / 3 participants [nested] [flat]
* Re: Support for dates before 4713 BC @ 2024-10-16 11:57 Richards, Nina <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Richards, Nina @ 2024-10-16 11:57 UTC (permalink / raw) To: Watzinger, Alexander <[email protected]>; +Cc: [email protected] <[email protected]> Dear all, As Alex, I'm involved with the OpenAtlas system (https://openatlas.eu), and in a recent meeting the issue about tracking dates before 4713 BC came up again. We appreciate all the work you put into developing PostgreSQL and love working with it. But as already mentioned in the discussion two years ago by Alex and Stefan Eichert (Message ID https://www.postgresql.org/message-id/CAJuUXVeNQWm9x7d2_cvzj2rEvtQgNeGF7vog9dmaN1W5e7EDCQ%40mail.gma...), working with dates before 4713 would facilitate our work tremendously. Even though we know there was no calendar at that time, it would make our work much easier if we could use data before 4713 BC in the same way. Especially for statistical analyses and scientific dating methods (14C, dendrochronology), this would be a great benefit for us as well as the users of OpenAtlas. Are there, by any chance, news about this issue? Or are you aware of any suitable workarounds on the database level in the meantime? Thank you so much in advance for all your work. It is highly appreciated! All the best, Nina [1674051323205] Nina Richards MA BSc Technische Mitarbeiterin OpenAtlas|Technical Staff OpenAtlas Austrian Centre for Digital Humanities and Cultural Heritage Österreichische Akademie der Wissenschaften | Austrian Academy of Sciences Bäckerstraße 13, 1010 Wien, Österreich | Vienna, Austria https://www.oeaw.ac.at/acdh/ <https://dhcr.clarin-dariah.eu/>https://openatlas.eu <https://www.oeaw.ac.at/acdh/; Attachments: [image/png] OutlookEmoji-1674051323205bec142cd-7cf1-45a9-a595-7bafd8d8d9a0.png (24.0K, 3-OutlookEmoji-1674051323205bec142cd-7cf1-45a9-a595-7bafd8d8d9a0.png) download | view image ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Support for dates before 4713 BC @ 2024-10-17 00:17 David Rowley <[email protected]> parent: Richards, Nina <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: David Rowley @ 2024-10-17 00:17 UTC (permalink / raw) To: Richards, Nina <[email protected]>; +Cc: Watzinger, Alexander <[email protected]>; [email protected] <[email protected]> On Thu, 17 Oct 2024 at 01:26, Richards, Nina <[email protected]> wrote: > Even though we know there was no calendar at that time, it would make our work much easier if we could use data before 4713 BC in the same way. Especially for statistical analyses and scientific dating methods (14C, dendrochronology), this would be a great benefit for us as well as the users of OpenAtlas. > > > Are there, by any chance, news about this issue? Or are you aware of any suitable workarounds on the database level in the meantime? It's by no means a trivial thing to do, but it is possible to implement new types in PostgreSQL [1]. If you invented your own type, you could significantly widen the upper and lower bounds when compared with the standard date type. David [1] https://www.postgresql.org/docs/current/sql-createtype.html ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Support for dates before 4713 BC @ 2024-10-17 00:36 Tom Lane <[email protected]> parent: David Rowley <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2024-10-17 00:36 UTC (permalink / raw) To: David Rowley <[email protected]>; +Cc: Richards, Nina <[email protected]>; Watzinger, Alexander <[email protected]>; [email protected] <[email protected]> David Rowley <[email protected]> writes: > It's by no means a trivial thing to do, but it is possible to > implement new types in PostgreSQL [1]. If you invented your own type, > you could significantly widen the upper and lower bounds when compared > with the standard date type. However, you'd then have to reimplement some large fraction of the existing datetime support to have something useful. We're already inventing freely to use the Gregorian calendar for millenia before Pope Gregory lived, so I see no conceptual argument not to extend that back even further. IIRC the stumbling block for not going back past Julian day 0 was uncertainty about whether the date2j and j2date algorithms behave correctly for negative Julian dates --- which at the time was compounded by the fact that C90 was vague about the rounding direction for integer division with negative inputs. Now that we assume C99 with its well-defined rule for that, at least some of the uncertainty is gone. Somebody would still have to study that code and either prove that it's OK or correct it. And then there would be a nontrivial amount of effort to work outwards and fix anything else that is assuming that limitation. So it would take somebody with considerable motivation to make it happen, but if such a somebody were to appear with a patch, we'd likely take it. (To be clear, I doubt any of the principal current hackers are interested in doing this.) Now, this would still only get you to a lower-bound date somewhere around 300000 BC. If you need to deal with geological or astronomical time spans, then yeah you need a new type --- but presumably you would not feel a need to tie it to Gregorian calendar dates, so the need to reimplement a ton of related logic would not be there. regards, tom lane ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-10-17 00:36 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-10-16 11:57 Re: Support for dates before 4713 BC Richards, Nina <[email protected]> 2024-10-17 00:17 ` David Rowley <[email protected]> 2024-10-17 00:36 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox