Re: Postgres storing time in strange manner

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Casey Allen Shobe <cshobe(at)secureworks(dot)net>, <pgsql-bugs(at)postgreSQL(dot)org>
Subject: Re: Postgres storing time in strange manner
Date: 2002-09-16 23:08:04
Message-ID: Pine.LNX.4.44.0209170049420.1307-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-novice

Tom Lane writes:

> Not sure; apparently it depends on optimization level, so I'd be
> hesitant to assume that any short test case would reliably expose
> the problem. Also, aren't you trying to avoid run-time tests in
> configure?

If the test doesn't use any library function's run-time behavior, you can
usually do something like

main() {
int a[(2.0+2.0==4.0)?1:-1]
}

This will fail to compile if the floating-point arithmetic is broken.

Otherwise a good solution might be to print a warning if configure detects
the flag. Or we can strip it out unconditionally, but that seems wrong.
The user should be made aware of the problem.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-16 23:09:36 Re: 7.3b1 on Mac OS X (Darwin)
Previous Message Tom Lane 2002-09-16 21:04:44 Re: Bug #769: Slow vacuuming due to error in optimization

Browse pgsql-novice by date

  From Date Subject
Next Message Ron Johnson 2002-09-17 00:56:42 Re: [BUGS] Postgres storing time in strange manner
Previous Message Terry Yapt 2002-09-16 20:43:39 Re: psql and readline library: cursor keys