Re: Range Types, discrete and/or continuous - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Range Types, discrete and/or continuous
Date
Msg-id 4CC5760B0200002500036DBB@gw.wicourts.gov
Whole thread Raw
In response to Range Types, discrete and/or continuous  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Range Types, discrete and/or continuous
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> wrote:
> Last development cycle, one of the questions that was unresolved
> was whether to handle ranges like a discrete set (that is, [1,5) =
> [1,4] ) or continuous or both.
> 
> I think that discrete ranges are required. For instance, day range
> and IP address ranges are two examples where treating them
> continuously would clearly cause confusion. "Monday until
> Thursday" is the same as "Monday through Wednesday," and it would
> be dangerous to treat them as different values.
All of the use cases I've been able to imagine as useful for our
shop would work fine with discrete ranges.  Continuous ranges seem
as though they would be more clumsy and dangerous for these use
cases.  Having not seen or imagined a practical use case for
continuous ranges, I'm indifferent to support for them.
It would be very useful to be able to specify a granularity -- for
example timestamps with a five minute granularity would be useful
for scheduling appointments. In some cases the granularity might be
inferred -- if we have a domain defined as numeric(13,2), it would
be nice if the default granularity was 0.01::numeric.
-Kevin


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: [BUGS] Segfault in 9.0 inlining SRF
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] Segfault in 9.0 inlining SRF