From: Tom Lane <tgl@sss.pgh.pa.us>
To: François Beausoleil <francois@teksol.info>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help with writing a generate_series(tsmultirange, interval)
Date: Sat, 31 Jul 2021 21:30:51 -0400
Message-ID: <1403075.1627781451@sss.pgh.pa.us> (raw)
In-Reply-To: <D4F46A5E-1619-4508-9693-4C6F3C251F5B@teksol.info>
References: <7DEBDB22-4E50-4A78-99FE-AF8C03261665@teksol.info>
<7aa77027-63c5-21df-181f-0852f9ceadf9@aklaver.com>
<D4F46A5E-1619-4508-9693-4C6F3C251F5B@teksol.info>
=?utf-8?Q?Fran=C3=A7ois_Beausoleil?= <francois@teksol.info> writes:
> While mowing the lawn, I thought that since the syntax of multi ranges is similar to arrays, maybe I could use unnest(), but sadly, that was not to be the case:
> # select unnest('{[2021-08-02,2021-08-04],[2021-08-07,2021-08-09)}'::tsmultirange);
> ERROR: function unnest(tsmultirange) does not exist
That's fixed for beta3:
regression=# 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, francois@teksol.info, adrian.klaver@aklaver.com
Subject: Re: Help with writing a generate_series(tsmultirange, interval)
In-Reply-To: <1403075.1627781451@sss.pgh.pa.us>
References: <7DEBDB22-4E50-4A78-99FE-AF8C03261665@teksol.info> <7aa77027-63c5-21df-181f-0852f9ceadf9@aklaver.com> <D4F46A5E-1619-4508-9693-4C6F3C251F5B@teksol.info> <1403075.1627781451@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox