Re: Range Types: empty ranges - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Range Types: empty ranges
Date
Msg-id AANLkTinLOEHbTSyZirzmaSoV40ODs=AKP-tzTBmXw6VJ@mail.gmail.com
Whole thread Raw
In response to Range Types: empty ranges  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Range Types: empty ranges  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Fri, Feb 11, 2011 at 1:11 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> Similarly, "intersection" of ranges is somewhat analogous to
> multiplication of numbers.

I had a feeling that we might be going in this direction.  It strikes
me that this case is a bit like division by zero.  It's kind of a
nuisance that dividing by zero throws an error and we COULD fix that
by making it return NULL or NaN or some new distinguished value DbZ.
But then we'd have to define what happens when you feed DbZ into every
other operation in the system, and similarly here.  If we define two
non-overlapping ranges as intersecting to NULL, or as throwing an
error, then everything else is clear after that.  I'm not sure it's
worth complicating the representation and the definitions of other
operations to cater to this case.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Range Types: empty ranges
Next
From: Robert Haas
Date:
Subject: Re: ALTER TYPE 2: skip already-provable no-work rewrites