Re: Range types
От | Martijn van Oosterhout |
---|---|
Тема | Re: Range types |
Дата | |
Msg-id | 20091216202436.GB17751@svana.org обсуждение исходный текст |
Ответ на | Re: Range types (Scott Bailey <artacus@comcast.net>) |
Список | pgsql-hackers |
On Wed, Dec 16, 2009 at 10:57:19AM -0800, Scott Bailey wrote: > Ok, silly question here. But how do you determine the length of a > continuous range? By definition length of [a, b) and (a, b] = b-a. But > what about (a,b) and [a,b]? Are we saying that because they are > continuous, the difference between values included in the range and > those excluded are so infinitesimally small so as not to matter? Thus > length (a,b) == length [a,b] == length [a,b)? And if that is the case, > does the inclusiveness of the range really even matter? Short answer: Yes Longer answer: You need to decide on your definition of "length" and what you usually use is the "measure". And yes, the difference between the two is so called "measure 0" and thus has no effect on the length. Note the measure has to be done considering the intervals as intervals on a real line. The integers by themselves have no measure (they are countable). So for the "length" of a set of integers you might consider the count of the set. http://planetmath.org/encyclopedia/ProofThatTheOuterLebesgueMeasureOfAnIntervalIsItsLength.html http://en.wikipedia.org/wiki/Outer_measure As for "continuous", as you use it above is not a way I recognise. There are contiguous sets, but they are something else. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
В списке pgsql-hackers по дате отправления: