Re: Re: [GENERAL] +/- Inf for float8's

Поиск
Список
Период
Сортировка
От Thomas Swan
Тема Re: Re: [GENERAL] +/- Inf for float8's
Дата
Msg-id 5.0.0.11.2.20000815115816.020d5be8@tangent.ics.olemiss.edu
обсуждение исходный текст
Ответ на Re: Re: [GENERAL] +/- Inf for float8's  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
>I'm not convinced NaN gives us anything useful, especially given how
>badly it breaks sorting. I've been digging into that code a little,
>and it's not going to be pretty. It strikes me as wrong to embed type
>specific info into the generic sorting routines.
>
>So, anyone have any ideas what NaN would be useful for? Especially given
>we have NULL available, which most (non DB) numeric applications don't.
>
>Ross

Just a wild guess, NaN could be used to indicated invalid numeric 
data.  However, this seems odd because it should have been checked prior to 
being put in the DB.

NULL is no value, +/- infinity could be just that or out of range, unless 
you want NaN to be out of range.   Depending on your scheme for 
representation you could take an out of range value and store it as +/i 
infinity.

These are just suggestions.

Thomas



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

Предыдущее
От: Jeff MacDonald
Дата:
Сообщение: Re: Security choices...
Следующее
От: Oliver Seidel
Дата:
Сообщение: NaN