Float Infinity
От | Kaloyan Iliev |
---|---|
Тема | Float Infinity |
Дата | |
Msg-id | 4587F5B0.7030908@faith.digsys.bg обсуждение исходный текст |
Список | 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
В списке pgsql-general по дате отправления: