Re: Range types
От | Tom Lane |
---|---|
Тема | Re: Range types |
Дата | |
Msg-id | 15105.1260889108@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Range types (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: Range types
|
Список | pgsql-hackers |
Greg Stark <gsstark@mit.edu> writes: > In fact, as I only recently found out, one of the design goals of IEEE > floats was specifically that they sort lexicographically and use every > bit pattern. So you can alwys get the "next" float by just > incrementing your float as an 64-bit integer. Yes that raises your > value by a different amount, and it's still useful. There are certainly some low-level numerical analysis situations where you want to get the "next" float value, but that hardly constitutes an argument for treating ranges of floats as discrete rather than continuous. Normal users of a range datatype aren't going to be interested in dealing with that sort of inherently machine-specific behavior. Even in types where next/previous are well defined, I'm not that comfortable with having range operations depend on them. What happens when one end of your range is INT_MIN or INT_MAX? regards, tom lane
В списке pgsql-hackers по дате отправления: