From: Jeff Davis <pgsql@j-davis.com>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>
To: David Fetter <david@fetter.org>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: range_agg
Date: Sat, 06 Jul 2019 12:26:06 -0700
Message-ID: <2ab176f136f0fda560f63cd091875bf21c4fe7df.camel@j-davis.com> (raw)
In-Reply-To: <CA+renyXwdgfJJVgAFBK2vfvrXrseLy6pq-mnhvKAdfazwEB30w@mail.gmail.com>
References: <16d71dc8-34cf-5ebd-1ce5-ccd93c0a14f9@illuminatedcomputing.com>
<ba323e489b98029be5ba2d5c5cbc99795f333f48.camel@j-davis.com>
<CA+renyX7jsWnyry6SOn-WSgdgQLtyFJ7SLWBVs+oatwQsMzvog@mail.gmail.com>
<20190705174531.GE24679@fetter.org>
<CA+renyXwdgfJJVgAFBK2vfvrXrseLy6pq-mnhvKAdfazwEB30w@mail.gmail.com>
On Fri, 2019-07-05 at 10:57 -0700, Paul A Jungwirth wrote:
> I take it that a multirange contains of *disjoint* ranges, so instead
> of {[1,2), [2,3), [6,7)} you'd have {[1,3), [6,7)}. Jeff does that
> match your expectation?
Yes.
> I just realized that since weighted_range_agg and covering_range_agg
> return tuples of (anyrange, integer) (maybe other numeric types
> too?),
> their elements are *not ranges*, so they couldn't return a
> multirange.
> They would have to return an array of those tuples.
I think you are right. I was originally thinking a multirange and an
array of weights would work, but the multirange would coalesce adjacent
ranges because it would have no way to know they have different
weights.
Regards,
Jeff Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, pj@illuminatedcomputing.com, david@fetter.org
Subject: Re: range_agg
In-Reply-To: <2ab176f136f0fda560f63cd091875bf21c4fe7df.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox