title: Update each row with incremental value Postgres
body: <p>I want to update every row in a table in Postgres and set each row to a different value; this value is gonna be an incremental value with a start value.</p>
  
  <p>For instance, suppose I have table <code>tab_a</code> with the following data:</p>
  
  <pre><code>|attr_a|attr_b|
  |1     |null  |
  |2     |null  |
  |3     |null  |
  |4     |null  |
  </code></pre>
  
  <p>The output I might want is:</p>
  
  <pre><code>|attr_a|attr_b|
  |1     |5     |
  |2     |6     |
  |3     |7     |
  |4     |8     |
  </code></pre>
  
  <p>Here is my script:</p>
  
  <pre><code>UPDATE tab_a
  SET attr_b = gen.id
  FROM generate_series(5,8) AS gen(id);
  </code></pre>
  
  <p>However is not working as expected...</p>