Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux