Re: timestamp patch to extend legal range of dates. - Mailing list pgsql-patches

From Tom Lane
Subject Re: timestamp patch to extend legal range of dates.
Date
Msg-id 2890.1044333673@sss.pgh.pa.us
Whole thread Raw
In response to timestamp patch to extend legal range of dates.  (John Cochran <jdc@fiawol.org>)
Responses Re: timestamp patch to extend legal range of dates.  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-patches
John Cochran <jdc@fiawol.org> writes:
> Here is a patch that modifies how timestamp values are generated and
> extends the legal range of timestamps. The overall effect is:
>   1. For dates prior to Oct 15, 1582 it uses the Julian calendar.
>   2. For dates on and after Oct 15, 1582, it uses the Gregorian calendar.
>
> The decision to have the switchover point be Oct 15, 1582 was made to cause
> the new routines return the same values as the old routines for the largest
> possible range. I did consider having the switchover be Sept 14, 1752 to
> be consistent with Unix, but decided against it.

This seems like rather an odd choice.  Isn't the 1752 date commonly
recognized as the start of Gregorian dating?

I'd be inclined to go with a changeover date that's defensible in the
long run, without regard to what we might have done before.  Backwards
compatibility with mistakes isn't a good design principle IMHO ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: timestamp patch to extend legal range of dates.
Next
From: Dave Cramer
Date:
Subject: Patch Applied question about rollback and SQLException