Skip site navigation (1) Skip section navigation (2)

Re: Working with dates before 4713 BC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Wallace <rywall(at)interchange(dot)ubc(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Working with dates before 4713 BC
Date: 2008-05-06 01:17:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Ryan Wallace <rywall(at)interchange(dot)ubc(dot)ca> writes:
> I am building an application which requires the storage of dates relating to
> the creation of archaeological items. The problem I am facing is that
> although most of the dates are working fine, some of the items were created
> before the beginning of recorded history (4713 BC). 

The existing date/timestamp code has no chance of dealing with that,
I'm afraid --- I doubt the code is likely to work for negative Julian
dates.  Its underlying assumptions are pretty much fantasy anyway,
that far back.  Nobody was using the Gregorian calendar then ...

Do you really need microsecond, or even day, resolution in your dates?
I wonder if it'd not be good enough to store the year as an integer.

			regards, tom lane

In response to


pgsql-sql by date

Next:From: Phillip SmithDate: 2008-05-06 01:28:49
Subject: Re: Working with dates before 4713 BC
Previous:From: Ryan WallaceDate: 2008-05-06 00:22:29
Subject: Working with dates before 4713 BC

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group