title: How can I insert the return of DELETE into INSERT in postgresql?
body: <p>I am trying to delete a row from one table and insert it with some additional data into another. I know this can be done in two separate commands, one to delete and another to insert into the new table. However I am trying to combine them and it is not working, this is my query so far:</p>
  
  <p><code>insert into b (one,two,num) values delete from a where id = 1 returning one, two, 5;</code></p>
  
  <p>When running that I get the following error:</p>
  
  <blockquote>
    <p>ERROR: syntax error at or near "delete"</p>
  </blockquote>
  
  <p>Can anyone point out how to accomplish this, or is there a better way? or is it not possible?</p>