Re: Generate a series of single days from a table of intervals. - Mailing list pgsql-novice

From Paul Linehan
Subject Re: Generate a series of single days from a table of intervals.
Date
Msg-id CAF4RT5TwyZW9VzJJp_JCmy1uMxM9fiCMT--oQ1giPZJ-52OKBA@mail.gmail.com
Whole thread Raw
In response to Re: Generate a series of single days from a table of intervals.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Generate a series of single days from a table of intervals.
List pgsql-novice
Hi, and thanks for your quick reply,


> https://www.postgresql.org/docs/9.5/static/functions-srf.html


I know about generate_series, but I would like this to
be generally applicable.


> See "LEFT JOIN" and "COALESCE"
>

Will do.

>> 2016-04-02       0

> Typo?

Yes :-)


>> I would like to do this using a recursive CTE if it's the best solution,
>> but I'm open to other approaches - different approaches appreciated.


> Really?  That should be the last choice of execution strategy.

> This isn't a tree, I'm doubtful that a recursive CTE is needed.

But recursive CTEs can be used to generate series, and as I
said, I don't want to use a PostgreSQL specific function.

> https://www.postgresql.org/docs/9.5/static/functions-range.html

Will take a look, thanks again,


Paul...


> David J.


pgsql-novice by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Generate a series of single days from a table of intervals.
Next
From: "David G. Johnston"
Date:
Subject: Re: Generate a series of single days from a table of intervals.