Re: pgtypeslib/timestamp problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgtypeslib/timestamp problem
Date
Msg-id 11073.1048774068@sss.pgh.pa.us
Whole thread Raw
In response to pgtypeslib/timestamp problem  (Michael Meskes <meskes@postgresql.org>)
Responses Re: pgtypeslib/timestamp problem
List pgsql-hackers
Michael Meskes <meskes@postgresql.org> writes:
> So here's the question comojng out of this all, anyone out here with an
> idea why the timestamp "Wed Jul 12 17:34:29 2000" becomes "Wed Jul 12
> 4649:34:26.000002 2000" when putting it into timestamp format and back
> out. The function is almost identical to timestamp_in resp.
> timestamp_out. If these two functions and their helpers are compield
> without "-O2" the output is correct.

FWIW, I get the correct answer in CVS tip on Red Hat Linux 8.0, which
is using gcc 3.2 (and -O2, per defaults in our makefiles):

regression=# set DateStyle TO postgres;
SET
regression=# select 'Wed Jul 12 17:34:29 2000'::timestamp;       timestamp         
--------------------------Wed Jul 12 17:34:29 2000
(1 row)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: pgtypeslib/timestamp problem
Next
From: Tom Lane
Date:
Subject: Re: Deadlock while doing VACUUM??