Is it possible to perform an update statement in sql, but only update if the updates are different?
for example
if in the database, col1 = \"hello\"
Old question but none of the answers correctly address null values.
Using <> or != will get you into trouble when comparing values for differences if there are is potential null in the new or old value to safely update only when changed use the is distinct from operator in Postgres. Read more about it here