From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | isfinite(interval) malfunctions |
Date: | 2001-01-24 19:13:30 |
Message-ID: | 200101241913.f0OJDUu45423@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thomas F. O\'Connell (tfo(at)monsterlabs(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
isfinite(interval) malfunctions
Long Description
for the most part, i have been impressed with postgres' ability to handle dates. unfortunately, i have run across a fair number of inconsistencies, such as the fact that certain constants lose their meaning even in contexts in which they appear to be defined.
for example, the function
bool isfinite( interval )
exists in postgres but seems to serve no meaningful purpose, as it always returns true, even in the face of a query such as:
select isfinite( timestamp 'infinity' - timestamp '-infinity' );
Sample Code
here is the exact sequence of steps necessary to produce the bug:
postgres]$ createdb foo
postgres]$ psql foo
foo=# select isfinite( timestamp 'infinity' - timestamp '-infinity' );
actual output:
isfinite
----------
t
(1 row)
expected output:
isfinite
----------
f
(1 row)
i compiled with all defaults except the install directory:
./configure --prefix=/opt/pgsql
we use the startup script from the documentation.
it starts the database like this from rc.3:
PGACCOUNT="postgres"
POSTMASTER="postmaster"
FACILITY="local5"
PGLOGFILE="/tmp/postgres.log"
PGOPTS="-i -d 0"
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
su - ${PGACCOUNT} -c "(${POSTMASTER} ${PGOPTS} 2>&1 | logger -p
${FACILITY}.notice) &" > /dev/null 2>&1 &
the bug can be reproduced in both
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66
and
PostgreSQL 7.1beta2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
platform info:
RedHat Linux 2.2.17 i686 unknown
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
256 MB RAM
No file was uploaded with this report
From | Date | Subject | |
---|---|---|---|
Next Message | Gonzalo Arana | 2001-01-24 20:50:24 | round - timestamp bug |
Previous Message | Bruce Momjian | 2001-01-24 16:33:26 | Re: [DOCS] Re: 7.1 released on 2000-09-01? |