Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrqbe-0003Y0-Oo for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 23:30:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrqbd-0006mD-BN for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Jun 2021 23:30:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrqbd-0006m5-0F for pgsql-hackers@lists.postgresql.org; Fri, 11 Jun 2021 23:30:29 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lrqbV-00067H-OT for pgsql-hackers@lists.postgresql.org; Fri, 11 Jun 2021 23:30:27 +0000 Received: by mail-il1-x12c.google.com with SMTP id i13so6653987ilk.3 for ; Fri, 11 Jun 2021 16:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KrFvcKdnjWO5crKOHk4oEGWW9dj+WqIyc215VoY9DME=; b=G69v/jCxTGeNnF7ngG/pZEsGL+NDPDm8qytVdykRG8Owr3Ljy4V6DGW2LNkz9Z6eeG x0ALq8jYdxHhSEU0wslsN0uN/JQ/+orAwKPSIdEDUwvFnioCKilz4fRYerr4LPS6LeNV AQ214hEqlmnOp5mUp3bX0UAgUsh5ARbV9dGHr5XcQ0y1/aZBuSg9hY4lL9kNNAt2fhtO Z0lh0bfAmAUv0G7mlJ9lbXHCzbYDauY5EdvhOmhTRI4Civq2bxfB8xCZpUKfFxRIorLM sP3wnTZzsSQXuTtuIE4h1srRQ5mXBt2CMEFZ4d/NW0v9tIq46USrD4dID7HDQu8vQhiy WZVA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KrFvcKdnjWO5crKOHk4oEGWW9dj+WqIyc215VoY9DME=; b=OLUjvpAt3QOcVslHidFU1Q5B2rrHZOKYvn34Yo1LQAg4heGRZFgufJBOZZaczrihw/ kejUBzrdG3IKUKNut5zpL8kOdw+CMVgJmoJ9ejafl7ZDhFxLBRFaHAgDUJvJilpX0udD lVPseI8/aYyy5mD0EVusg8WovKF78oY8Fj1D3B5mCFyRrfdT5elKs/t+6two1mWG2arC FQ8TTiIUCxX0KQIaGgtFAh3x3cXW5Tf4Dsy/f9LuYvBCtvYeMwf6ys9kbro1Gqct/i0p amk1SLwg9PgpeYHfzdrSxKSvk4yAR+pUYZWaCixbhQ8C0fCgdG2tsNqU/aod2QgRk0YY MMrw== X-Gm-Message-State: AOAM53347+7w0e/NRtPkfiSQlIRrQss5Rb1y2cxSeBsSRZuF7nBURYaW YoybYAzN5JD4YYegMfgeov52Fg== X-Google-Smtp-Source: ABdhPJxMQMZCtcBsSneWQuiO9QKXD+LXPEnDaDtWGJkR6hu0JWqhZ+hTNn2tzhhdJGXv75MJVzZPtQ== X-Received: by 2002:a05:6e02:1c44:: with SMTP id d4mr4928347ilg.49.1623454220040; Fri, 11 Jun 2021 16:30:20 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k12sm3757238ilu.77.2021.06.11.16.30.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jun 2021 16:30:19 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 22B3D800A36; Fri, 11 Jun 2021 18:30:18 -0500 (CDT) Date: Fri, 11 Jun 2021 18:30:18 -0500 From: Justin Pryzby To: Alexander Korotkov Cc: "Jonathan S. Katz" , Alvaro Herrera , Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: unnesting multirange data types Message-ID: <20210611233017.GO16435@telsasoft.com> References: <202106092056.qitkvnvmpadu@alvherre.pgsql> <95432464-1b63-bc84-6f84-e9e9d79f9687@postgresql.org> <20210610220416.GJ16435@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jun 11, 2021 at 11:37:58PM +0300, Alexander Korotkov wrote: > On Fri, Jun 11, 2021 at 1:04 AM Justin Pryzby wrote: > > > > +{ oid => '1293', descr => 'expand mutlirange to set of ranges', > > > > typo: mutlirange > > Fixed, thanks. > > The patch with the implementation of both unnest() and cast to array > is attached. It contains both tests and docs. |+ The multirange could be explicitly cast to the array of corresponding should say: "can be cast to an array of corresponding.." |+ * Cast multirange to the array of ranges. I think should be: *an array of ranges Per sqlsmith, this is causing consistent crashes. I took one of its less appalling queries and simplified it to this: select pg_catalog.multirange_to_array( cast(pg_catalog.int8multirange() as int8multirange)) as c2 from (select 1)x; -- Justin