title: Inserting values (generate_series) - how can I reuse/cycle the numbers, e.g, 1,2,3,1,2,3
body: <p>I am using generate_series to insert values in a table. And generate_series insert values  as specified in its range.</p>
  
  <p>For example:
  for the following query, </p>
  
  <pre><code>SELECT i AS id, i AS age, i AS house_number
  INTO egg
  FROM generate_Series(1,6) AS i;
  </code></pre>
  
  <p>the result we get is:</p>
  
  <pre><code>id  age  house_number
  1   1    1
  2   2    2
  3   3    3
  4   4    4
  5   5    5
  6   6    6
  </code></pre>
  
  <p>But my problem is, I want to insert only till number 3 in column "age" and then start from 0 after 3:</p>
  
  <pre><code>id  age  house_number
  1   1    1
  2   2    2
  3   3    3
  4   1    4
  5   2    5
  6   3    6
  </code></pre>
  
  <p>Is this possible? Are there some random functions in <code>generate_series()</code> which performs the same function?</p>