-
Notifications
You must be signed in to change notification settings - Fork 702
sql: improve privileges docs #695
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
Conversation
PTAL @tiancaiamao |
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.
LGTM
sql/privilege.md
Outdated
@@ -289,7 +294,7 @@ When TiDB starts, some privilege-check tables are loaded into memory, and then t | |||
If an immediate effect is needed when you modify the `grant` table, you can run the following command: | |||
|
|||
```sql | |||
flush privileges | |||
flush privileges; |
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.
Perhaps use ALL CAPS here
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.
@lilin90 do we have a style for SQL commands? I like to write keywords in caps as kenny suggests, but many of our existing examples are lower case.
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.
If the style is all-lowercase then the DROP USER 'test';
statement above should be changed to drop user 'test';
.
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.
Yeah, I agree. I'll change it.
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.
@lilin90 There are quite a few inconsistencies: CREATE USER
, REVOKE
are in caps. I can go through and change once I have confirmation of the style.
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.
@morgo Thanks! Currently, we don't have a strict SQL style. But to improve the consistency, we can now establish one: "Capitalize all SQL keywords and reserved words." Later, I'll update that in docs-cn and tell other members to follow this style.
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.
@lilin90 thanks, I've updated all keywords to caps. PTAL
LGTM |
I noticed a few small errors in the privileges page. While few users use column-level privileges, I think it is still worth calling out on the compatibility page.