Re: Dates and times (and timestamps) don't behave as expected

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bob Soeters <bob(at)iway(dot)nl>
Cc: lockhart(at)fourpalms(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Dates and times (and timestamps) don't behave as expected
Date: 2001-05-02 04:21:01
Message-ID: 3AEF8B2D.BFA71D2D@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

(cc'd back to the -bugs list)

> I'm truly sorry about this, shouldn't have posted that bug report, since it
> was me, after a little research.

OK, thanks for following up!

> I run the Mandrake 7.1 distribution, which was equipped with PostgreSQL 6.5,
> or so I believe. I then upgraded to 7.0.3, through some Mandrake specific
> RPMs. All was well. I noticed the timestamp error in that version, because I
> wrote a little Perl DBI exercise and found out that I couldn't insert the
> timestamp as I had gotten it from the backend, directly. It said "Bad
> external representation". After overlooking it for a couple of hours (!), I
> finally saw that the number of seconds were out of range, it was displayed
> as 2001-04-29 00:00:60.00+02.

That is a known problem with the the way Mandrake built their RPMs for
PgSQL 7.0.x. There are RPMs at ftp.postgresql.org which have this
repaired.

> I then looked in the bugtool database, and saw other users that had the same
> problem. Also, using functions like date() on the timestamp seemed to make
> matters worse, adding a day or even a month to the actual inserted timestamp
> value upon output. I then decided to upgrade to the new PG 7.1 release, from
> source. So I built it, and thought I had installed it correctly all the way.
> I found out that the old backend was still running though, so there was now
> a mix-up of versions. Since I corrected that, I've seen no trouble anymore
> with the timestamps.

Great!

> Sorry for wasting your valuable time with this faulty bugreport, I should've
> tested more carefuly. Further, I want to compliment the development team,
> another great job done with version 7.1, I'm hooked. Keep up the good work.

No problem; it is impossible to know exactly the right time to give up
on a problem search and report it to the list, and sometimes in
hindsight waiting longer or posting earlier would have been better.

Glad things are working well for you. btw, is it possible to update the
bugtool database with the problem resolution? If so, perhaps you could
do that when you have a chance.

- Thomas

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Lockhart 2001-05-02 04:26:18 Re: Sorry, need to restart postmaster at db.hub.org (fts.postgresql.org)
Previous Message Tom Lane 2001-05-01 14:14:56 Re: [HACKERS] Re: date conversion (was Re: Re: v7.1.1 branched and released on Tuesday ...)