Re: Ranges for well-ordered types

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Ranges for well-ordered types
Date: 2006-06-13 04:25:56
Message-ID: 20060613042556.GA26794@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 11, 2006 at 15:13:39 +0900,
Michael Glaesemann <grzm(at)seespotcode(dot)net> wrote:
>
> That's different from being able to show equivalence between two
> ranges in different representations, e.g., r1 = r2 iff a1 = a2 and b1
> = next(b2). As Bruno pointed out earlier, in some cases, a closed-
> open representation is desirable, and I think that in others, such as
> date ranges, a closed-closed representation is useful. Another place
> where I'd use a closed-closed representation would be for describing
> score ranges for grades (e.g., 70-79 is a C, 80-89 is a B). I'm not
> sure how to go about converting between these two representations
> without using a successor (or predecessor) function.

Date ranges are really closed open as well (as finite sets of isolated points
are both open and closed). The only oddity would be that the date used to
indicate the open end of the range might not be what the user expects.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2006-06-13 08:13:51 Re: pg_get_INDEXdef - opclass
Previous Message Bruce Momjian 2006-06-13 01:25:35 Re: CSV mode option for pg_dump