On Fri, 2011-02-11 at 13:08 -0600, Kevin Grittner wrote: > It makes more sense in the context of a range of some type with a > clearly defined granularity. Our accounting system, for example, > can assign a new range of receipt IDs for each calendar year. If > you want a variable to represent the receipts for traffic receipts > for 2012, you might, in preparation for the upcoming year, define > something to declare the range as '[12TR000001,12TR000001)'. When > the first receipt is assigned as 12TR000001, that is updated to > '[12TR000001,12TR000002)'. Just as an off-the-cuff example. > > Basically, with a type having well-defined granularity, a [) range > could usefully represent, "start to last used", and start out empty.
I think this is trying to make a range into something that's not. A range is a set of values with the additional constraint that there are no "gaps". Trying to incorporate a "start value" is adding extra information in there, and it's not really a part of the same algebra. It sounds more like a contiguous sequence with a "start value" and a "current value" to me. Sequences have other useful operations, like "next", and things like "overlaps" don't really seem to make sense (at least not in a practical way that I can tell). Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers