-
Notifications
You must be signed in to change notification settings - Fork 78
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
Showing
5 changed files
with
222 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.