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: print comments in SHOW CREATE TABLE
Fixes cockroachdb#42875 Release note (sql change): SHOW CREATE TABLE now prints comments.
- Loading branch information
Showing
8 changed files
with
178 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
statement ok | ||
CREATE TABLE c ( | ||
a INT NOT NULL, | ||
b INT NULL, | ||
INDEX c_a_b_idx (a ASC, b ASC), | ||
FAMILY fam_0_a_rowid (a, rowid), | ||
FAMILY fam_1_b (b) | ||
) | ||
|
||
statement ok | ||
COMMENT ON TABLE c IS 'table' | ||
|
||
statement ok | ||
COMMENT ON COLUMN c.a IS 'column' | ||
|
||
statement ok | ||
COMMENT ON INDEX c_a_b_idx IS 'index' | ||
|
||
query TT colnames | ||
SHOW CREATE c | ||
---- | ||
table_name create_statement | ||
c CREATE TABLE c ( | ||
a INT8 NOT NULL, | ||
b INT8 NULL, | ||
INDEX c_a_b_idx (a ASC, b ASC), | ||
FAMILY fam_0_a_rowid (a, rowid), | ||
FAMILY fam_1_b (b) | ||
); | ||
COMMENT ON TABLE c IS 'table'; | ||
COMMENT ON COLUMN c.a IS 'column'; | ||
COMMENT ON INDEX c_a_b_idx IS 'index' | ||
|
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 was deleted.
Oops, something went wrong.