title: Reuse inserted id
body: <p>Say I have a table Contracts:</p>
  
  <pre><code>  id  |  name | document_url  
  -----------------------------
  </code></pre>
  
  <p>Where the documentUrl is automatically generated/uploaded to S3 and has the following structure:</p>
  
  <p><code>https://s3-bucket.aws.com/${id}.pdf</code></p>
  
  <p>My question is how I can insert that in a single <code>INSERT</code> query.</p>
  
  <pre><code>INSERT INTO contracts(name, document_url)
  VALUES('bob', ${process.env.S3_BUCKET}.aws.com/????.pdf}
  </code></pre>
  
  <p>I am calling this code from inside a NodeJS server, and the bucket is stored as an environment variable outside the database on a per server basis. Is there some way to get the id of the row currently being inserted, or do I have to insert returning, and then update within a transaction?</p>