Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNllR-0002FA-GO for pgsql-hackers@arkaria.postgresql.org; Mon, 06 May 2019 22:07:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hNllN-0002wA-Fh for pgsql-hackers@arkaria.postgresql.org; Mon, 06 May 2019 22:07:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hNllN-0002v7-5Z for pgsql-hackers@lists.postgresql.org; Mon, 06 May 2019 22:07:09 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hNllK-0001IW-8k for pgsql-hackers@postgresql.org; Mon, 06 May 2019 22:07:08 +0000 Received: by fetter.org (Postfix, from userid 1001) id 941CF42BC3; Tue, 7 May 2019 00:07:04 +0200 (CEST) Date: Tue, 7 May 2019 00:07:04 +0200 From: David Fetter To: Paul Jungwirth Cc: Pgsql Hackers Subject: Re: range_agg Message-ID: <20190506220703.GG28936@fetter.org> References: <16d71dc8-34cf-5ebd-1ce5-ccd93c0a14f9@illuminatedcomputing.com> <20190504014147.GC28936@fetter.org> <16a2d956-f9da-6bed-6473-de9d1ec0a428@illuminatedcomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16a2d956-f9da-6bed-6473-de9d1ec0a428@illuminatedcomputing.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, May 06, 2019 at 11:19:27AM -0700, Paul Jungwirth wrote: > On 5/3/19 6:41 PM, David Fetter wrote: > > This suggests two different ways to extend ranges over aggregation: > > one which is a union of (in general) disjoint intervals, two others > > are a union of intervals, each of which has a weight. > > . . . > > I think the cases above, or at least the first two of them, should be > > available. They could be called range_agg, weighted_range_agg, and > > covering_range_agg. > > Thanks David! I think these two new functions make sense. Before I implement > them too I wonder if anyone else has uses for them? I suspect that if you build it, the will come, "they" being anyone who has to schedule coverage, check usage of a resource over time, etc. Is this something you want help with at some level? Coding, testing, promoting... Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate