title: Insert missing month in series in postgresql
body: <p>I have a WITH table that partitions by id and counts the number of items that the user have created up to a certain month:</p>
  
  <pre><code>|      ID |  COUNT |   MONTH |
  ------------------------------
  |       1 |      1 | 2013-01 |
  |       1 |      2 | 2013-05 |
  |       2 |      1 | 2013-02 |
  |       2 |      2 | 2013-04 |
  |       2 |      3 | 2013-06 |
  |       3 |      1 | 2013-01 |  
  </code></pre>
  
  <p>In postgresql, how can you add count onto months that are missing to create a final query result like this?</p>
  
  <pre><code>|      ID |  COUNT |   MONTH |
  ------------------------------
  |       1 |      1 | 2013-01 |
  |       1 |      1 | 2013-02 |
  |       1 |      1 | 2013-03 |
  |       1 |      2 | 2013-04 |
  |       1 |      2 | 2013-05 |
  |       1 |      3 | 2013-06 |
  |       2 |      1 | 2013-02 |
  |       2 |      1 | 2013-03 |
  |       2 |      2 | 2013-04 |
  |       2 |      2 | 2013-05 |
  |       2 |      3 | 2013-06 |
  |       3 |      1 | 2013-01 |  
  |       3 |      1 | 2013-02 |  
  |       3 |      1 | 2013-03 |
  |       3 |      1 | 2013-04 |
  |       3 |      1 | 2013-05 |
  |       3 |      1 | 2013-06 |
  </code></pre>