原来pg生成日期序列这么容易,我在sql server里只能写递归来完成,囧
select generate_series from generate_series(to_date('2012-04-19','yyyy-mm-dd'),
to_date('2012-05-18', 'yyyy-mm-dd'),
'1 day' ::interval)
select generate_series from generate_series(to_date('2012-04-19','yyyy-mm-dd'),
to_date('2012-05-18', 'yyyy-mm-dd'),
'1 day' ::interval)