unsafe floats

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема unsafe floats
Дата
Msg-id Pine.LNX.4.44.0403102232420.13979-100000@zigo.dhs.org
обсуждение исходный текст
Ответы Re: unsafe floats  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: unsafe floats  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
When UNSAFE_FLOATS is defined there is a check that float results are 
within the min and max limits, which excludes values like 'Infinity', 
'-Infinity' and 'Nan'.

Is the above something from the SQL standard or just a bug?

The input rules for float8 accepts 'Infinity' as a value, and then it just
triggers a overflow error directly after (unless UNSAFE_FLOATS is
defined).

At first I thought it was a bug, but this function that checks for
overflow wouldn't even be needed if not to stop such values. Without the
check every possible value would be accepted (on normal IEEE math). I can
see a use in not accepting Infinity and Nan, but I would rather put that
as constraints if I needed that in my database.

Any thoughts? Should I go ahead and make it accept 'Infinity' and the 
rest as numbers?

-- 
/Dennis Björklund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: selective statement logging
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unsafe floats