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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Bruce Hunsaker <hunsakerbn(at)ldschurch(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 13:25:03
Message-ID: 20141107132503.GM1791@alvin.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian wrote:
> On Thu, Nov 6, 2014 at 07:29:49AM -0700, Bruce Hunsaker wrote:
> > > I have applied the attached C comment to document why we use the
> > > Gregorian calendar for pre-1582 years.
> >
> > Thanks everyone for the response. I guess the bottom line for us
> > is that if we want to store dates before 1582, we may not want
> > to use date or timestamp columns for that data, particularly if
> > the dates are from a Julian calendar.
>
> Yeah, the big problem is that there is no way to store leap days for
> years like 1500. The only good part is that the Gregorian calendar is
> very good at keeping the calendar aligned with the seasons.

I think this warrants a big "Meh". Here we have a use case for which
a very good calendar system would be truly useful, and it seems as we
satisfy almost all of what the OP needs; yet we fail only because of a
mostly trivial leap year issue.

I agree we don't want a simplistic change that would only change the
rule from Gregorian to Julian without much other thinking; but suppose
Bruce H was able to come up with a well reasoned design to cover all
interesting cases, would we consider accepting a patch that changed the
behavior? I would also go as far as suggesting that a different data
type might be a useful direction to consider. (Now I am assuming that
Bruce H is willing to put in the effort to make this work in the first
place.)

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-11-07 15:06:26 Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Previous Message Robert Haas 2014-11-07 13:24:45 Re: [HACKERS] ltree::text not immutable?