Re: left and overleft/notright revisited: why !>> and !<<

Поиск
Список
Период
Сортировка
От William White
Тема Re: left and overleft/notright revisited: why !>> and !<<
Дата
Msg-id 4071E4D5.4050400@frognet.net
обсуждение исходный текст
Ответ на left and overleft/notright revisited: why !>> and !<< might be poor names  (William White <bwhite@frognet.net>)
Список pgsql-general
Tom Lane wrote:
> William White <bwhite@frognet.net> writes:
>
>>Consider the empty interval (n,n) (any empty interval will do, they're
>>all the same empty set),
>
>
> I don't think that's the case.  [0,0) and [1,1) are certainly
> distinguishable given the normal machine representation of intervals.

Every definition of an interval I've seen defines it in terms of a set.

For example, the interval (a,b) in R is the set {x : x > a and x < b}.
Thus, the empty set does not have a unique representation as an interval
in R, just as the nondirected line segments ((0,0),(1,1)) and
((1,1),(0,0)) are identical regardless of the fact that the
representations are not.

Incidentally, my attempts to construct valid operators which *do* treat
various open empty intervals as distinct led to some rather peculiar
(usually inconsistent) results, especially when operating upon empty
open intervals whose endpoints were identical (e.g., (a,a] and (a,a]).

> If you use a mathematical model that says they're not distinguishable,
> that says to me that you chose the wrong model --- especially when the
> model leads you into logical difficulties that need not (and do not)
> exist in the actual implementation.

Do you have an alternative to suggest, given the requirements that the
operators return the expected results on nonempty intervals, and the
usual logic applies (e.g., S @ T and S ~ T ==> S ~= T)


Thanks,

-- Bill

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

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Date differences
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Evening in NYC