Re: 7.4.2 Regression tests: test stats loops indefinately... - Mailing list pgsql-general

From Vikram Kulkarni
Subject Re: 7.4.2 Regression tests: test stats loops indefinately...
Date
Msg-id 20040504145130.GE30567@padu.brownforces.org
Whole thread Raw
In response to Re: 7.4.2 Regression tests: test stats loops indefinately...  (Manfred Koizar <mkoi-pg@aon.at>)
Responses Re: 7.4.2 Regression tests: test stats loops indefinately...
List pgsql-general
On Tue, May 04, 2004 at 10:36:20AM +0200, Manfred Koizar wrote:
>On Mon, 3 May 2004 20:47:31 -0400, Vikram Kulkarni wrote:
>>
>> test=# SELECT timeofday();
>>               timeofday
>> -------------------------------------
>>  Wed Dec 31 16:00:00.591964 1969 PST
>> (1 row)
>> [...]
>> That obviously doesn't look right. Isnt' timeofday() supposed to return
>> the current time of day? The system clock is set correctly.
>
> Vik, I guess that on your platform time_t is smaller than long.  Please
> compile and run the attached C program.

hmmm... on OpenBSD-3.5/sparc64, time_t is an int...
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/sparc64/include/ansi.h?rev=1.4&content-type=text/x-cvsweb-markup

The compiler is GCC 3.3.2 with ProPolice.

dt% ./a.out
old: >>Wed Dec 31 19:00:00.451903 1969 EST<<
new: >>Tue May 04 10:41:12.455457 2004 EDT<<

But on my older, OpenBSD-3.1/i386 computer, time_t is defined in the
same way, though the compiler is GCC 2.95.3. and the two dates printed
there match. hmm...

-Vik

--
vikram vinayak kulkarni    Happiness is a Dunkin Donut.
vkulkarn@brownforces.org                    -Jason Zych
http://vvk.brownforces.org

pgsql-general by date:

Previous
From: Michal Hlavac
Date:
Subject: Variable in PostgreSQL 7.4.x
Next
From: Robert Treat
Date:
Subject: Re: set autocommit TO FALSE on postgres 7.4