Re: pgtypeslib/timestamp problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgtypeslib/timestamp problem
Date: 2003-03-27 14:07:48
Message-ID: 11073.1048774068@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgresql(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-27 14:29:10 Re: Deadlock while doing VACUUM??
Previous Message Michael Meskes 2003-03-27 13:26:27 pgtypeslib/timestamp problem