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 1iiNxc-0006lc-0h for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Dec 2019 19:29:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iiNxZ-0008RC-VP for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Dec 2019 19:29:13 +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 1iiNxY-0008R5-VJ for pgsql-hackers@lists.postgresql.org; Fri, 20 Dec 2019 19:29:13 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iiNxS-0001Cd-6l for pgsql-hackers@postgresql.org; Fri, 20 Dec 2019 19:29:11 +0000 Received: by mail-pj1-x1041.google.com with SMTP id n96so4536637pjc.3 for ; Fri, 20 Dec 2019 11:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=1Dnq+rdpjZFQ5UaqpEBL2YMPaPJLczY+kAt8t4Nz4b0=; b=zgs8rAuT9tfau8vWY/y09mJlYKLeYFuAK39eWFotG49yiX0xd3kKel/JYez+p9JL32 PWYs65ot8lu/t+GshLLzYuX5H4GXMDTq8r1V5xqcyYjPWok6KIC4vDcJTqTbPR31QDSA JU3ih5RIXkI4SwETSK2Q2OZz96GfoenPAojNJKu2q3INcUMH16HB4o3OE4YkMkbVDKc+ SVc94rs9gxXjwB424DYUlaUtePFyxfvated8l3FIvIVMBWpAypegZRIedNcxCoWviiF1 LkuuE91n+sZ4gWA6PDdv4UaFH0Q6JDVcavZdtFdFo9SEAud1JRzN0EqaLpVwF51InBYz T70w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1Dnq+rdpjZFQ5UaqpEBL2YMPaPJLczY+kAt8t4Nz4b0=; b=B2kPc5b1C0a3rXxiTeUHasT5jv+wQdp+3RssSB6lshemnaBLqCoZMOXUJybFPZlcAl GU66JTGPtzrg/trAYZRemrpldBhNPXJw0728e37dMIecPqpQGtrB0f1rrDR4EYzMKXlQ nXX3SkoILwQihdADONmxCQCmoriQI5z0yooylz+doBFrrNJ+3PDnJ3VY6kcBsyvHYLKl jxramXDonmYF3NGa6bVJueM6RHr0F6MR9JVQPr0vfSg4kpW3v0u54GNNflEkPW1HCzGP eqzFDV9bdAkGoAXYVi80OXthG+CO2225K4MubPA2kSMLHTssZ/Ewt9r9nAbiMCOEFSm6 gjVg== X-Gm-Message-State: APjAAAXGIAjQBjsO986HUFOqbBrBmAvpvFdtJterp8yV/EPGR4hCAWnd GLHw3CV0RwCMzC4IM10l/Dp22g== X-Google-Smtp-Source: APXvYqwQVueVqj/PWxC47SBPp62EwUKo0u73kW3Ol8h3eu7bprsIt1sMpIsMStQZXRIiFw7kmOm98Q== X-Received: by 2002:a17:902:b208:: with SMTP id t8mr17459786plr.38.1576870144913; Fri, 20 Dec 2019 11:29:04 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([201.186.81.122]) by smtp.gmail.com with ESMTPSA id s15sm12498387pgq.4.2019.12.20.11.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 11:29:04 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 58CC1300A84; Fri, 20 Dec 2019 16:29:01 -0300 (-03) Date: Fri, 20 Dec 2019 16:29:01 -0300 From: Alvaro Herrera To: Paul A Jungwirth Cc: Pavel Stehule , Jeff Davis , Pgsql Hackers Subject: Re: range_agg Message-ID: <20191220192901.GA9955@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Dec-20, Paul A Jungwirth wrote: > Is it permitted to add casts with polymorphic inputs & outputs? Is > that something that we would actually want to do? I'd probably need > both the polymorphic and concrete casts so that you could still say > `int4range(1,2)::int4multirange`. I'm embarrased to admit that I don't grok the type system well enough (yet) to answer this question. > Should I change the coerce code to look for casts among concrete types > when the function has polymorphic types? I'm pretty scared to do > something like that though, both because of the complexity and lest I > cause unintended effects. Yeah, I suggest to stay away from that. I think this multirange thing is groundbreaking enough that we don't need to cause additional potential breakage. > Should I just give up on implicit casts and require you to specify > one? That makes it a little more annoying to mix range & multirange > types, but personally I'm okay with that. This is my preferred > approach. +1 > I have some time over the holidays to work on the other changes Alvaro > has suggested. I hope not to have made things worse by posting a rebase. Anyway, that's the reason I posted my other changes separately. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services