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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Re: [GENERAL] +/- Inf for float8's
Дата
Msg-id
3777.966879572@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Re: [GENERAL] +/- Inf for float8's Thomas Lockhart <lockhart@fourpalms.org>
Re: Re: [GENERAL] +/- Inf for float8's Tom Lane <tgl@sss.pgh.pa.us>
"Ross J. Reedstrom"  writes:
> While examining the output from ORDER BY queries, both using and not using
> an index, I came across a discrepancy: the explicit handling of NULLs in
> the tuplesort case always sorts NULLs to the end, regardless of direction
> of sort.

Yeah.  I think that's widely considered a bug --- we have a TODO item to
fix it.  You might care to dig in the archives for prior discussions.

> To make the direct sort the same as the index read would work for NULL,
> but for NaN would either require allowing NaN to be returned as >
> Infinity, which doesn't happen now,

Seems to me the sort order should be
-Infinitynormal values+Infinityother types of NaNNULL

and the reverse in a descending sort.

> or add another ordering operator that is only used for the sort case
> (use of '>' and '<' seems to be hardcoded all the way to the parser)

don't even think about that...
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Ross J. Reedstrom
Дата:
От: Don Baccus
Дата:
FAQ