title: How to toggle a boolean in postgres in one query
body: <p>I'm trying to update a row in a postgres table. I want to toggle a boolean field. </p>
  
  <p>Instead of first checking what the value is and updating the field with the opposite, I was wondering if there was a single query to update the field.</p>
  
  <p>I found a solution for MySQL, but its not working for postgres:</p>
  
  <pre><code> UPDATE table SET boolean_field = !boolean_field WHERE id = :id
  
   Error: Operator does not exist. ! boolean
  </code></pre>
  
  <p>Is there an similar syntax in postgres?</p>