Re: unsafe floats

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unsafe floats
Дата
Msg-id 13606.1078958863@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: unsafe floats  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> So I'd vote for ripping out the range check, or at least reversing
>> the default state of UNSAFE_FLOATS.

> This would surely be wrong. Defining UNSAFE_FLOATS will make
> float4in() not check that its input fits into a 'float', rather than a
> 'double'.

Possibly the appropriate test involves using isfinite() (apparently
spelled finite() some places, but the C99 spec says isfinite).  If
that returns false, take the value as good without checking range.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: selective statement logging
Следующее
От: Bruce Momjian
Дата:
Сообщение: fsync with sync, and Win32 unlink