title: postgresql: Fast way to update the latest inserted row
body: <p>What is the best way to modify the latest added row without using a temporary table.
  E.g. the table structure is</p>
  
  <pre><code>id | text | date
  </code></pre>
  
  <p>My current approach would be an insert with the postgresql specific command "returning id" so that I can update the table afterwards with</p>
  
  <pre><code>update myTable set date='2013-11-11' where id = lastRow
  </code></pre>
  
  <p>However I have the feeling that postgresql is not simply using the last row but is iterating through millions of entries until "id = lastRow" is found. How can i directly access the last added row?</p>