Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year - Mailing list pgsql-bugs

From Bruce Hunsaker
Subject Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Date
Msg-id 20141107153053.GE4482@gr8.dev
Whole thread Raw
In response to Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 07 Nov 14 10 06, Tom Lane wrote:
> 5. A side issue that's probably pretty relevant for the OP's application
> is that not every country adopted the Gregorian calendar at the same time.
> Really if he wants any data integrity he's going to need to store an
> explicit indication of whether a date is in Julian or Gregorian calendar.
> (In a world of infinite manpower you could imagine extending the zic
> database to provide information about which calendar was used when in
> every region, but I don't see us going there.)

It's quite relevant for us, and for other systems, and so we do our own
date standardization to take into account those factors.  Unfortunately
this specific data pre-dates our standardization process, and we are
not sure it's worth the effort to fix, particularly since we only
got errors for the one date.

>
> So the risk/reward/backwards-compatibility tradeoff just doesn't look
> very good from here.
>
> I think the OP's best bet is to store old dates as text, or perhaps
> integers, with some CHECK constraints to make whatever validity checks
> he deems appropriate.

This has been, and is our approach for new systems going forward.

Thanks
--
Bruce Hunsaker


 NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and
privilegedinformation. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the
intendedrecipient, please contact the sender by reply email and destroy all copies of the original message. 

pgsql-bugs by date:

Previous
From: Bruce Hunsaker
Date:
Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Next
From: Tom Lane
Date:
Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year