Generate an array of time-based values, from start to stop with a given step size.
Syntax
1ARRAY_GENERATE_SERIES(<start>, <stop>, <step>)
Arguments
Required
<start>: The start value of the series. Can be of type DATE, TIMESTAMP, or TIMESTAMP WITH TIME ZONE.
<stop>: The end value of the series. Must be of the same type as <start>.
<step>: The step size as an INTERVAL. Unlike the numerical version of ARRAY_GENERATE_SERIES, the step size is always required for time-based series.
Returns
Returns an ARRAY containing the generated series of values.
Considerations
This function is equivalent to the generate_series (Time-based) function, with the only difference that it returns an array instead of a set of rows.
Read the documentation on generate_series (Time-based) for more details.
All considerations also apply to array_generate_series with the following differences: