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 1hjq8Z-0004m7-MV for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jul 2019 19:14:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjq7a-0004Cm-2I for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jul 2019 19:13:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjq7Z-00046o-Hp for pgsql-hackers@lists.postgresql.org; Sat, 06 Jul 2019 19:13:17 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjq7W-0003sq-Or for pgsql-hackers@postgresql.org; Sat, 06 Jul 2019 19:13:16 +0000 Received: by mail-pf1-x42b.google.com with SMTP id i189so5656128pfg.10 for ; Sat, 06 Jul 2019 12:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZxsVCV1Cmh2LBp/XEhGrMiuXNUdFcMRPrbe+muVGJls=; b=TS6z90nDH2n1HTzSn2PkccY18XQx5LFSAalDRBLDqYB1myvFiRdfyaMvaNPVvwCopL NqcyVFaUzJM+37BQmfcMW+ZlKBXj3AzgdPm8BuED463tY02ixei2oUmvoA/u1HSR/ZOC iVFyvQdol/HpyenPX1FbsazHZoXxxm305LV+tKkde7Ats4EycVnai4REuIXyxNxQ0oDn E2siIPfBeWGhsjvD3DySk3v4YtsLnb8ziDK6XmkHMTxFR5WdX3KkhO8a87l9HXrM9H54 +8PZXr0crdrS7isp8pxK+4n0Ye96+zR9cXtZJjkUozhO2JEI6qwRDY45kWqzFdGOlD8e wwVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZxsVCV1Cmh2LBp/XEhGrMiuXNUdFcMRPrbe+muVGJls=; b=jSDCUyrjtyQEmXP4gbrvBEt8OBqdVCCim/1x6WdcHaqS0Smo5tS2uOBp5ZrnPFDQ1M 18D2sL20ll/LJNuJAOvmvJ6bQBCSLPCcjVIt3DDuHK+yH8QrC1nJnqaBw8nVhGWkzvQ8 wblhvRjMMgSPFEXad57+kGNylvMCJn4Mrp37hXEh+41Lh2iN0GX/XgQvZgJ1XTZI2v1O 8Gl/YJR5k6Qzl3nrgqY7Eq+HjaOi4bTqaXEjWD6rUD9xU5ofjg2/E9zz++USBYLuwzuJ fR4oaCdMqQay7u2TSb6Zu132mquGpEbuefzRhRJfNVVaUrVJQyfnCWiphMYuxOqYal6L /0WA== X-Gm-Message-State: APjAAAWsm8XFM6auIAXEOZXEv5QuUawv+f/sppa95PP5SYaruoZI05XW bgnnr6sB7+U2FKkS9BRxXjt/tQ== X-Google-Smtp-Source: APXvYqxRHf51Zy+IUDXjBaaLTHS+2AImsA/BdleNZK8Qp91ypM13QxjkLhQrEjLWKsDmmVxbBN+uHg== X-Received: by 2002:a65:64c6:: with SMTP id t6mr8547027pgv.323.1562440392992; Sat, 06 Jul 2019 12:13:12 -0700 (PDT) Received: from jdavis.lan (c-71-204-186-7.hsd1.ca.comcast.net. [71.204.186.7]) by smtp.gmail.com with ESMTPSA id d16sm6476058pgb.4.2019.07.06.12.13.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Jul 2019 12:13:10 -0700 (PDT) Message-ID: Subject: Re: range_agg From: Jeff Davis To: Paul A Jungwirth Cc: Pgsql Hackers Date: Sat, 06 Jul 2019 12:13:08 -0700 In-Reply-To: References: <16d71dc8-34cf-5ebd-1ce5-ccd93c0a14f9@illuminatedcomputing.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 2019-07-05 at 09:58 -0700, Paul A Jungwirth wrote: > user-defined range types. So how about I start on it and see how it > goes? I expect I can follow the existing code for range types pretty > closely, so maybe it won't be too hard. That would be great to at least take a look. If it starts to look like a bad idea, then we can re-evaluate and see if it's better to just return arrays. The "weighted" version of the aggregate might be interesting... what would it return exactly? An array of (range, weight) pairs, or an array of ranges and an array of weights, or a multirange and an array of weights? > Another option would be to rename my function range_array_agg (or > something) so that we are leaving space for a multirange function in > the future. I don't love this idea myself but it would could a Plan > B. > What do you think of that? Not excited about that either. Regards, Jeff Davis