forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Refactors CTAS logic to allow user defined PKs.
This change removes the need for a separate `AsColumnNames` field in the CreateTable node, and uses `ColumnTableDefs` instead. This is similar to a normal CREATE TABLE query, thereby allowing us to piggyback on most of the existing logic. It ensures `row_id` key generation only occurs if no PK is explicitly specified. Some special handling is required in pretty printing, as column types are not populated at the time of parsing. Release note: None
- Loading branch information
1 parent
a111dac
commit f8333e7
Showing
5 changed files
with
244 additions
and
63 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
Oops, something went wrong.