Re: BUG #1927: incorrect timestamp returned - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #1927: incorrect timestamp returned
Date
Msg-id 20051004152015.GB6925@surnet.cl
Whole thread Raw
In response to Re: BUG #1927: incorrect timestamp returned  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: BUG #1927: incorrect timestamp returned
List pgsql-bugs
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.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
"That sort of implies that there are Emacs keystrokes which aren't obscure.
I've been using it daily for 2 years now and have yet to discover any key
sequence which makes any sense."                        (Paul Thomas)

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #1927: incorrect timestamp returned
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #1927: incorrect timestamp returned