Skip site navigation (1) Skip section navigation (2)

isfinite(interval) malfunctions

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: (view raw, whole thread or download thread mbox)
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:
(1 row)

expected output:
(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:

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

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

pgsql-bugs by date

Next:From: Gonzalo AranaDate: 2001-01-24 20:50:24
Subject: round - timestamp bug
Previous:From: Bruce MomjianDate: 2001-01-24 16:33:26
Subject: Re: [DOCS] Re: 7.1 released on 2000-09-01?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group