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 1mA0Jh-0001Y0-La for pgsql-general@arkaria.postgresql.org; Sun, 01 Aug 2021 01:31:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mA0Je-00085o-9y for pgsql-general@arkaria.postgresql.org; Sun, 01 Aug 2021 01:30:58 +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 1mA0Jd-00085f-Ef for pgsql-general@lists.postgresql.org; Sun, 01 Aug 2021 01:30:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mA0Jb-0006EW-5r for pgsql-general@lists.postgresql.org; Sun, 01 Aug 2021 01:30:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1711UpmO1403076; Sat, 31 Jul 2021 21:30:51 -0400 From: Tom Lane To: =?utf-8?Q?Fran=C3=A7ois_Beausoleil?= cc: Adrian Klaver , pgsql-general@lists.postgresql.org Subject: Re: Help with writing a generate_series(tsmultirange, interval) In-reply-to: References: <7DEBDB22-4E50-4A78-99FE-AF8C03261665@teksol.info> <7aa77027-63c5-21df-181f-0852f9ceadf9@aklaver.com> Comments: In-reply-to =?utf-8?Q?Fran=C3=A7ois_Beausoleil?= message dated "Sat, 31 Jul 2021 20:16:37 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1403074.1627781451.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 31 Jul 2021 21:30:51 -0400 Message-ID: <1403075.1627781451@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?utf-8?Q?Fran=3DC3=3DA7ois_Beausoleil?=3D writes= : > While mowing the lawn, I thought that since the syntax of multi ranges i= s similar to arrays, maybe I could use unnest(), but sadly, that was not t= o be the case: > # select unnest('{[2021-08-02,2021-08-04],[2021-08-07,2021-08-09)}'::tsm= ultirange); > ERROR: function unnest(tsmultirange) does not exist That's fixed for beta3: regression=3D# select unnest('{[2021-08-02,2021-08-04],[2021-08-07,2021-08= -09)}'::tsmultirange); unnest = ----------------------------------------------- ["2021-08-02 00:00:00","2021-08-04 00:00:00"] ["2021-08-07 00:00:00","2021-08-09 00:00:00") (2 rows) regards, tom lane