From: | Kaloyan Iliev <news1(at)faith(dot)digsys(dot)bg> |
---|---|
To: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Float Infinity |
Date: | 2006-12-19 14:22:40 |
Message-ID: | 4587F5B0.7030908@faith.digsys.bg |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi All,
I just want to ask shouldn't substraction from infinity returns infinity
in float just like in timestamp?
This is for float:
a=# SELECT version();
version
------------------------------------------------------------------------------------------------
PostgreSQL 8.1.5 on i386-portbld-freebsd6.2, compiled by GCC cc (GCC)
3.4.6 [FreeBSD] 20060305
(1 row)
a=# SELECT 'Infinity'::float;
float8
----------
Infinity
(1 row)
a=# SELECT 'Infinity'::float-10;
ERROR: type "double precision" value out of range: overflow
a=# SELECT 'Infinity'::float+10;
ERROR: type "double precision" value out of range: overflow
a=# SELECT 'Infinity'::float-10::float;
ERROR: type "double precision" value out of range: overflow
a=# SELECT 'Infinity'::float+10::float;
ERROR: type "double precision" value out of range: overflow
And this is for timestamp:
a=# SELECT 'Infinity'::timestamp;
timestamp
-----------
infinity
(1 row)
a=# SELECT 'Infinity'::timestamp-'10 days'::interval;;
?column?
----------
infinity
(1 row)
Regards,
Kaloyan
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-12-19 14:23:28 | Re: MAGIC_MODULE and libc |
Previous Message | Jeff Amiel | 2006-12-19 14:20:23 | MAGIC_MODULE and libc |