From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: range_agg |
Date: | 2019-07-09 18:24:56 |
Message-ID: | 0a4160cfcf126ab9dd74aedc40d2545367b05ba8.camel@j-davis.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2019-07-09 at 07:08 +0200, Pavel Stehule wrote:
>
> I am not against a multirange type, but I miss a explanation why you
> introduce new kind of types and don't use just array of ranges.
>
> Introduction of new kind of types is not like introduction new type.
The biggest benefit, in my opinion, is that it means you can define
functions/operators that take an "anyrange" and return an
"anymultirange". That way you don't have to define different functions
for int4 ranges, date ranges, etc.
It starts to get even more complex when you want to add opclasses, etc.
Ranges and arrays are effectively generic types that need a type
parameter to become a concrete type. Ideally, we'd have first-class
support for generic types, but I think that's a different topic ;-)
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2019-07-09 18:32:46 | Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status) |
Previous Message | Dave Cramer | 2019-07-09 18:20:01 | Re: Proposal to add GUC_REPORT to lc_monetary, lc_numeric and search_path |