Re: Range Types and length function
От | Florian Pflug |
---|---|
Тема | Re: Range Types and length function |
Дата | |
Msg-id | 9909F6B8-D2CE-4A79-86E7-0F081B950146@phlo.org обсуждение исходный текст |
Ответ на | Re: Range Types and length function (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: Range Types and length function
|
Список | pgsql-hackers |
On Jun27, 2011, at 03:12 , Jeff Davis wrote: > But I think you're right, it shouldn't be the responsibility of range > types. Perhaps I should leave length() as some inlinable SQL functions > like I mentioned, or perhaps I should remove them completely. Does the current definition of length(range), i.e. upper(range) - lower(range) deal correctly with open vs. closed ranges and unbounded ranges? I'm thinking that it probably doesn't - what would be the results of length('[0,1]'::intrange) -- Should be 2 length('[0,1)'::intrange)-- Should be 1 length('[0,inf]'::intrange) -- Should be infinity, but ints can't represent that, can't they? If it cannot be easily made to support these cases, than I vote for removing it all together. best regards, Florian Pflug
В списке pgsql-hackers по дате отправления: