update table with case statement postgresql