Partial updates with functions
For example, when only title changes, do not update content. Or when only content changes, do not update title. Or when they both change, both of them have to be updated.


Why? When either of them changes just update both of them. It's an MVCC database and any change to the table will result in a whole new row being written and the old one being marked as dead.

UPDATE post
SET title = $2, content = $3
WHERE post_id = $1
  AND title &lt;&gt; $2
  OR content &lt;&gt; $3;


And don't use VARCHAR(100) use text