Re: Range Types and length function

Поиск
Список
Период
Сортировка
Искать
От
Greg Stark
Тема
Re: Range Types and length function
Дата
Msg-id
BANLkTineSD6D3R+dUiz5iiTE75+NUNAn7A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Range Types and length function Jeff Davis <pgsql@j-davis.com>
Re: Range Types and length function Florian Pflug <fgp@phlo.org>
Re: Range Types and length function Jeff Davis <pgsql@j-davis.com>
Re: Range Types and length function Florian Pflug <fgp@phlo.org>
Re: Range Types and length function Jeff Davis <pgsql@j-davis.com>
Re: Range Types and length function Greg Stark <stark@mit.edu>
Re: Range Types and length function Jeff Davis <pgsql@j-davis.com>
On Sun, Jun 26, 2011 at 8:18 AM, Jeff Davis  wrote:
>  * it needs to know the result type of that function, which might not be
> the subtype (for instance, for timestamp the difference type would be
> interval)

What's the use case for the length() function? Is it for users to be
able to display useful information about their ranges? Or is it for
implementing things like GIST indexes?

For the latter a length function that always returns a float might be
more useful. Even if it isn't guaranteed to always be perfectly
precise, that is if ranges of similar length sometimes returned
identical values, at least it could be used for things like penalty().


-- 
greg

В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
Сообщение: Re: WIP: Fast GiST index build
От: Heikki Linnakangas
Дата:
FAQ