Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year

From: Bruce Hunsaker <hunsakerbn(at)ldschurch(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Bruce Hunsaker <hunsakerbn(at)ldschurch(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>, <hunsakerbn(at)familysearch(dot)org>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Date: 2014-11-07 15:30:53
Message-ID: 20141107153053.GE4482@gr8.dev
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-11-07 15:40:57 Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Previous Message Bruce Hunsaker 2014-11-07 15:16:11 Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year