-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YSQL] Single row update overwrites unmodified columns with default v…
…alues to null #4127 Summary: Fix a regression for single-row updates and columns with default values introduced commit 7e222b4. Default values for columns need to be handled for INSERTs (i.e. to be used in case there is no user-provided value). However, UPDATEs should not modify columns that were explicitly set, regardless of whether a default is set for that column. Therefore, there is no need to distinguish columns with default for the UPDATE case, so revert the change that did that. Instead, we need to distinguish between single-row and non-single-row execution for update, because non-single-row execution can have triggers modifying columns values (set or defaults). Test Plan: TestPgRegressDml (yb_dml_single_row), existing TestPgRegressBetaFeatures (yb_pg_triggers). Reviewers: neha, sudheer Reviewed By: neha Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D8225
- Loading branch information
Showing
3 changed files
with
251 additions
and
3 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
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
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