title: Is it possible to " Select N times"?
body: <p>Unfortunately, the data model for my database must change so I am looking for the most painless way to migrate my data.</p>
  
  <p>How it is at this moment:</p>
  
  <pre><code>create table cargo{
    id serial primary key,
    person_id int,
    weight_id float,
    reps_id int
  );
  //skipping constraints declaration
  </code></pre>
  
  <p>However it happened that person is able to lift different values of cargo each turn</p>
  
  <p>What I am going to do is modify <code>cargo</code> table and add <code>turn</code> table like this:</p>
  
  <pre><code>create table cargo{
   id serial primary key,
   person_id int,
   );
  //skipping constraints declaration
  
  create table turn{
    id serial primary key,
    cargo_id int,
    weight float
  );
  </code></pre>
  
  <p>normally I could migrate existing data like this:</p>
  
  <pre><code>insert into turn (cargo_id, weight) select id, weight from cargo;
  </code></pre>
  
  <p>but this way I am losing all of <code>reps</code> where <code>reps</code> > 1</p>
  
  <p>Is it possible to create insert into select, where select would be called as many times as <code>reps</code> count without making script?</p>