title: Generate time series with date and hour and create table in Amazon Redshift
body: <p>I'd like to generate a table of dates and hours in Amazon Redshift. The following query would work in Postgresql 9.1 and above but unfortunately we're limited to Amazon Redshift, which resulted in error: "function generate_series does not exist."  Your help in generating time series in 8.02 like the result table would be greatly appreciated.</p>
  
  <pre><code>SELECT * FROM generate_series('2008-03-01 00:00'::timestamp, 
                            '2008-03-04 12:00', '10 hours');
    generate_series   
  
  generate_series   
      ---------------------
       2008-03-01 00:00:00
       2008-03-01 10:00:00
       2008-03-01 20:00:00
       2008-03-02 06:00:00
       2008-03-02 16:00:00
       2008-03-03 02:00:00
       2008-03-03 12:00:00
       2008-03-03 22:00:00
       2008-03-04 08:00:00
  </code></pre>
  
  <p><strong>Edit</strong>:
  I was able to generate the time series that I wanted with the following code but was unable to create them into a table in Redshift.  Error message was: </p>
  
  <p>"Specified types or functions (one per INFO message) not supported on Redshift tables."</p>
  
  <pre><code>SELECT '2017-01-01 00:00:00'::timestamp + x * interval'1 hour' AS Date_Time
  FROM generate_series(0, 1000 * 24) AS g(x)
  </code></pre>
  
  <p>Any ideas how this can be created into a table in Redshift? Thanks.</p>