Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid UPDATE stmt when none of the columns change
We need at least two columns to be able to skip a column if the value is the same in the old and new rows. Otherwise, we would end up with an invalid UPDATE statement like below: ``` UPDATE table SET WHERE "id" = 1; ``` Usually, the above could happen when REPLICA IDENTITY is set to FULL, and the UPDATE statement executed with the same values as the old ones. For e.g. ``` UPDATE table SET "id" = 1 WHERE "id" = 1; ``` Solution: Skip the update when all columns in SET clause is equal to the WHERE clause. Signed-off-by: Arunprasad Rajkumar <[email protected]>
- Loading branch information