title: Postgres - Return error on update if record not found
body: <p>I am wondering if there is a way of getting an error back on update if the row does not exist in the database when I issue an update.</p>
  
  <pre><code>update users set email='aa@bb.com' where id=200
  </code></pre>
  
  <p>If users table does not have user with id=200, then postgres simply says "UPDATE 0". However, I am wondering if I can get an error back. That way, I don't have to issue 2 requests to the database, once to check existence, once to update. There could also be a race condition between checking the existence and issuing an update if we do it separately.</p>
  
  <p>Why do I need an error? Simple - so the clients know they have used an invalid user id and they take corrective action.</p>