Re: [GENERAL] Bad timestamp external representation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: Richard Huxton <dev(at)archonet(dot)com>, tamsin <tg_mail(at)bryncadfan(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Bad timestamp external representation
Date: 2001-07-25 22:53:21
Message-ID: 200107252253.f6PMrLo19943@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


I can confirm that current CVS sources have the same bug.

> It's a bug in timestamp output.
>
> # select '2001-07-24 15:55:59.999'::timestamp;
> ?column?
> ---------------------------
> 2001-07-24 15:55:60.00-04
> (1 row)
>
> Richard Huxton wrote:
> >
> > From: "tamsin" <tg_mail(at)bryncadfan(dot)co(dot)uk>
> >
> > > Hi,
> > >
> > > Just created a db from a pg_dump file and got this error:
> > >
> > > ERROR: copy: line 602, Bad timestamp external representation '2000-10-03
> > > 09:01:60.00+00'
> > >
> > > I guess its a bad representation because 09:01:60.00+00 is actually 09:02,
> > > but how could it have got into my database/can I do anything about it?
> > The
> > > value must have been inserted by my app via JDBC, I can't insert that
> > value
> > > directly via psql.
> >
> > Seem to remember a bug in either pg_dump or timestamp rendering causing
> > rounding-up problems like this. If no-one else comes up with a definitive
> > answer, check the list archives. If you're not running the latest release,
> > check the change-log.
> >
> > HTH
> >
> > - Richard Huxton
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
>
> --
> Joseph Shraibman
> jks(at)selectacast(dot)net
> Increase signal to noise ratio. http://www.targabot.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lee Harr 2001-07-25 22:54:57 Re: Compile problem on fBSD 4.3
Previous Message Steve Wolfe 2001-07-25 22:44:44 Re: Hardware Recommendations

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Myers 2001-07-25 23:31:31 Re: Bad timestamp external representation
Previous Message Bruce Momjian 2001-07-25 22:48:04 Re: Bug in psql tab completion