Re: Help with writing a generate_series(tsmultirange, interval)

2021-08-01 Thread Alban Hertroys
> On 1 Aug 2021, at 3:30, Tom Lane wrote: > > =?utf-8?Q?Fran=C3=A7ois_Beausoleil?= 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-

Re: Help with writing a generate_series(tsmultirange, interval)

2021-07-31 Thread Tom Lane
=?utf-8?Q?Fran=C3=A7ois_Beausoleil?= 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)}'::tsmultiran

Re: Help with writing a generate_series(tsmultirange, interval)

2021-07-31 Thread Adrian Klaver
On 7/31/21 5:16 PM, François Beausoleil wrote: Hello Adrian, Yes, in fact, I wrote the following: -- CREATE FUNCTION generate_series(tstzrange, interval) RETURNS SETOF ti

Re: Help with writing a generate_series(tsmultirange, interval)

2021-07-31 Thread François Beausoleil
Hello Adrian, > Le 31 juill. 2021 à 15:49, Adrian Klaver a écrit : > > On 7/31/21 11:59 AM, François Beausoleil wrote: >> Hello all! >> I’m excited for multi ranges, as they fit nicely into a scheduling app. What >> I’m trying to express is something along the lines of « Every weekday from >>

Re: Help with writing a generate_series(tsmultirange, interval)

2021-07-31 Thread Adrian Klaver
On 7/31/21 11:59 AM, François Beausoleil wrote: Hello all! I’m excited for multi ranges, as they fit nicely into a scheduling app. What I’m trying to express is something along the lines of « Every weekday from 2021-08-01 and 2021-10-01, from 9 AM to 8 PM, every 90 minutes ». You can think of