The corresponding structs in timestamp.c and int.c have no comment, so suggestions of what should be there are welcome. In the interim I put in this:
/* state for generate_series_date(date,date,[step]) */
Extra linefeed after struct removed.
Do you have any insight as to why the documentation test failed?
In the mean time, here's the updated patch.
[step] is in days, but is not documented as such.
My understanding is you want to replace this
SELECT d.dt::date as dt
FROM generate_series('2015-01-01'::date,
'2016-01-04'::date,
interval '1 day') AS d(dt);
with this
SELECT d.dt FROM generate_series('2015-01-01'::date, '2016-01-04'::date, 7) as d(dt);
Personally, I think writing INTERVAL '7 days' to be clearer than just typing 7.
Other than that, the only difference is the ::date part. Is it really worth adding extra code just for that? I would say not.
No comments on the patch itself, which seems to do the job, so apologies to give this opinion on your work, I do hope it doesn't put you off further contributions.
--
Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services