Re: BUG #1927: incorrect timestamp returned

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: postgres(at)saparev(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1927: incorrect timestamp returned
Date: 2005-10-04 15:24:15
Message-ID: 200510041524.j94FOFl16359@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Alvaro Herrera wrote:
> On Tue, Oct 04, 2005 at 10:40:11AM -0400, Bruce Momjian wrote:
> > Kouber Saparev wrote:
> > > >>
> > > >>select timestamp '2005-09-23 23:59:59.9999999'
> > > >>
> > > >>I get the following result (note the value of the seconds):
> > > >>
> > > >>2005-09-23 23:59:60.00
> > > >
> > > > It's the leap second.
> > >
> > > It is not a leap second. Leap seconds are always either on the 30th of
> > > June or on the 31th of December.
> > >
> > > Here there is a list of all the leap seconds so far:
> > > http://en.wikipedia.org/wiki/Leap_second
> > >
> > > And, in fact, the wrong result is the same for each date, regardless of
> > > the year, month or day.
> >
> > Right. We allow leap seconds for any date/time. Are you saying we
> > should only allow them for certain dates/times?
>
> We should do that for timestamp or timestamptz, but there's no way we
> could check for a bare time or timetz ...
>
> Also it'd require a recompile whenever a new leap second is added; and
> that the Wikipedia hints that leap seconds may disappear in 2008 in
> favor of "leap hours", whatever that may be.

Yea, I am thinking our current behavior is as good as we can make it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-04 15:38:30 Re: BUG #1927: incorrect timestamp returned
Previous Message Alvaro Herrera 2005-10-04 15:20:15 Re: BUG #1927: incorrect timestamp returned

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-10-04 15:38:30 Re: BUG #1927: incorrect timestamp returned
Previous Message Alvaro Herrera 2005-10-04 15:20:15 Re: BUG #1927: incorrect timestamp returned