You can join generate_series as easily as you selected it. Something like this should do the trick:
select t.* from generate_series('2010-01-01'::timestamp, '2013-01-01'::timestamp, '1 day') as s(d) join your_table t on (sd between t.start and t.end)
Of course, you should indicate real dates, not 2010-01-01 and 2013-01-01 .
Older versions, such as 8.3, do not have generate_series , which works with timestamps, but you can fake it using generate_series to create daily offsets from the start date:
select t.* from generate_series(0, 1096) dt(d) join your_table t on ('2010-01-01'::date + dt.d between t.start and t.end)
As before, configure 0 , 1096 and '2010-01-01' according to your data.
source share