Re: SELECT '(1, nan, 3)'::cube;

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SELECT '(1, nan, 3)'::cube;
Дата
Msg-id 2336.1300214620@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SELECT '(1, nan, 3)'::cube;  ("Robert Brewer" <fumanchu@aminus.org>)
Список pgsql-bugs
"Robert Brewer" <fumanchu@aminus.org> writes:
> Tom Lane wrote:
>> I'd suggest rethinking your design to avoid needing NaN in a cube.

> I could, of course, use a sentinel value like -1 or even -Inf to mean
> "indeterminate", but I'd like future versions of this app (wink) to be
> able to use qnan's as IEEE 754 intended. Note that cube doesn't take
> NULL either. It may be surprising and underspecified, but using NaN and
> Inf in other cube operations (including gist indices) does indeed work
> quite well--probably because they are, after all, just floats. I believe
> it's a bug to handle only some subset of values of an extremely
> well-known and well-specified datatype like float, but of course I
> understand if contrib modules aren't high priority.

Well, this is the sort of thing that'll only get fixed when someone who
actually uses the datatype is motivated to improve it.  IOW, if you
submitted a patch it'd likely get accepted.

            regards, tom lane

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

Предыдущее
От: "Robert Brewer"
Дата:
Сообщение: Re: SELECT '(1, nan, 3)'::cube;
Следующее
От: Robert Brewer
Дата:
Сообщение: SELECT '(1, nan, 3)'::cube