title: postgres random using setseed
body: <p>I would like to add a column with a random number using <code>setseed</code> to a table.  </p>
  
  <p>The original table structure <code>(test_input) col_a,col_b,col_c</code></p>
  
  <p>Desired output <code>(test_output) col_a, col_b, col_c, random_id</code></p>
  
  <p>The following returns the same <code>random_id</code> on all rows instead of a different value in each row.</p>
  
  <pre><code>select col_a,col_b,col_c,setseed(0.5),(
       select random() from generate_series(1,100) limit 1
       ) as random_id 
  from test_input
  </code></pre>
  
  <p>Could you help me modify the query that uses <code>setseed</code> and returns a different <code>random_id</code> in each row?</p>