You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments