Bug(?) around 'infinity'

Started by Alexander M. Pravkingabout 24 years ago2 messagesbugs
Jump to latest
#1Alexander M. Pravking
fduch@antar.bryansk.ru

Operating system:
FreeBSD 4.4-STABLE

PostgreSQL version:
postmaster (PostgreSQL) 7.1.3

psql input:
test=> SELECT timestamp 'infinity' - timestamp 'infinity';

psql output:
?column?
-------------------------------------------------
-2147483648 days --2147483648:-2147483648:00NaN
(1 row)

In the documentation, nothing said about 'infinity' and '-infinity'
timestamp values, except that the first is later than other valid times,
and the second is earlier than other valid times.

Sorry if my English is poor.

--
Fduch M. Pravking

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexander M. Pravking (#1)
Re: Bug(?) around 'infinity'

Fduch the Pravking <fduch@antar.bryansk.ru> writes:

postmaster (PostgreSQL) 7.1.3

psql input:
test=> SELECT timestamp 'infinity' - timestamp 'infinity';

psql output:
?column?
-------------------------------------------------
-2147483648 days --2147483648:-2147483648:00NaN
(1 row)

In current sources (7.2RC2, more or less) I get

regression=# SELECT timestamp 'infinity' - timestamp 'infinity';
ERROR: Unable to subtract non-finite timestamps

So this has apparently been dealt with...

regards, tom lane