-
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.
51400: opt, cat: cleaner API for mutation columns r=RaduBerinde a=RaduBerinde **NOTE** I used `AllColumnCount` so that the compiler forces me to look at all callsites, and left it like this so they are also apparent in the diff. I intend to rename it to `ColumnCount` before merging. The catalog currently relies on a particular ordering to separate different kinds of columns (ordinary, write-only, delete-only). This is unfortunate because it restricts the underlying implementation; in particular, it makes it tricky to add a new kind of column (like the `mvcc_timestamp` system column) without potentially breaking existing code in subtle ways. This change reworks the cat API to have a single `ColumnCount` method and a separate `ColumnKind` method used to figure out the column kind. This forces all code that cares about the kind to check it explicitly rather than relying on a potentially faulty column count. Fixes #51323. Release note: None 51406: sql: ensure SQLSTATE 42710 on secondary errors r=rohany a=knz Amends #51260 When creating an object that collides with another, we have to perform another lookup to get the kind of object that it collided with. If an error occurs during this second stage, we want the error to propose SQLSTATE "Duplicate object" (42710) to the client if there is no pgcode in the error object already. Release note: None Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
24 changed files
with
266 additions
and
204 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
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
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
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
Oops, something went wrong.