Re: range_agg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: range_agg
Date
Msg-id 16397.1583616058@sss.pgh.pa.us
Whole thread Raw
In response to Re: range_agg  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: range_agg  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
I wrote:
> Actually ... have you given any thought to just deciding that ranges and
> multiranges are the same type?  That is, any range can now potentially
> contain multiple segments?  That would eliminate a whole lot of the
> tedious infrastructure hacking involved in this patch, and let you focus
> on the actually-useful functionality.

Also, this would allow us to remove at least one ugly misfeature:

regression=# select '[1,2]'::int4range + '[3,10)'::int4range;
 ?column? 
----------
 [1,10)
(1 row)

regression=# select '[1,2]'::int4range + '[4,10)'::int4range;
ERROR:  result of range union would not be contiguous

If the result of range_union can be a multirange as easily as not,
we would no longer have to throw an error here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Add an optional timeout clause to isolationtester step.
Next
From: Tom Lane
Date:
Subject: Re: Add an optional timeout clause to isolationtester step.