-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: support INSERT with partial UNIQUE WITHOUT INDEX constraints
Uniqueness checks on INSERTs are now performed for partial UNIQUE WITHOUT INDEX constraints. The semi-join filters in the uniqueness checks filter out rows that do not satisfy the predicate. Rows on both sides of the join are filtered. This is required to prevent duplicate key violations from occurring for rows that do not satisfy the predicate of the partial unique constraint. The WithScan and Scan of the uniqueness check now produce all ordinary table columns, rather than just the PK and unique columns, because predicates may refer any columns in the table. Informs #59195 There is no release note because these constraints are gated behind the experimental_enable_unique_without_index_constraints session variable. Release note: None
- Loading branch information
Showing
9 changed files
with
1,961 additions
and
959 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
Oops, something went wrong.