Re: Dates and times (and timestamps) don't behave as expected - Mailing list pgsql-bugs

From Thomas Lockhart
Subject Re: Dates and times (and timestamps) don't behave as expected
Date
Msg-id 3AEF8B2D.BFA71D2D@alumni.caltech.edu
Whole thread Raw
In response to Dates and times (and timestamps) don't behave as expected  (pgsql-bugs@postgresql.org)
List 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

pgsql-bugs by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Dates and times (and timestamps) don't behave as expected
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: SELECT min(id) FROM test; uses seqscan