Postgres: UPDATE a boolean column that sets all other booleans in that column to false
<p>I'm wondering if I can do this in one query</p>

<p>Usecase: twitter pinned tweet. You can have at most one pinned tweet and setting a new pinned tweet, unset all the other previously pinned tweets.</p>

<p>Any ideas?</p>