-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jseldess/basic sql commands #40
Conversation
@@ -40,8 +40,8 @@ SHOW DATABASES; | |||
+----------+ | |||
| Database | | |||
+----------+ | |||
| db1 | | |||
| system | | |||
| "db1" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really the case that these show up with quotes?
If it is, then the table below needs them as well (the one with aardvarks etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This occurred with the switch to the pgwire driver. We can probably get rid of them as the formatting is up to us (currently we blindly use %q
for any []byte
returned).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petermattis, is this true for table names, field names, and types, as well, since all of those now show up with quotes?
root@:15432> show columns from cockroaches;
+----------------+----------+-------+---------+
| Field | Type | Null | Default |
+----------------+----------+-------+---------+
| "country_code" | "STRING" | false | NULL |
| "count" | "INT" | true | NULL |
| "date" | "DATE" | true | NULL |
+----------------+----------+-------+---------+
root@:15432> show tables;
+---------------+
| Table |
+---------------+
| "cockroaches" |
+---------------+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please file an issue against the main repo to remove the quotes - at least from type names, column names, table names from the . String values are debatable, we can discuss in that issue. FWIW psql
does not quote any of these (even when they have spaces).
@RaduBerinde, @petermattis: Latest commit should address your previous feedback:
Please let me know if you have any other thoughts. You can see an updated html version here: http://cockroach-draft-docs.s3-website-us-east-1.amazonaws.com/basic-sql-statements.html |
); | ||
``` | ||
|
||
Table and column names must follow [these rules](identifiers.html). Also, when you don't explicitly define a `PRIMARY KEY`, CockroachDB will automatically add a `rowid` column as the primary key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hidden rowid column
LGTM |
Added
select
basics to Query a Table section.You can see html version here: http://cockroach-draft-docs.s3-website-us-east-1.amazonaws.com/basic-sql-commands.html
Covers #5 and #33.
In future, will edit examples to be more specific, probably a bank scenario.