-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add missing data type keywords #724
Conversation
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.
Thank you @norosa!
@mfussenegger and @seut: There is no remote command to inquire the list of keywords from CrateDB itself yet, right?
Not all data types are automatically keywords. In fact, most aren't. Looks like the list of keywords in the admin-ui already contains a lot of things that are not keywords in CrateDB. |
@mfussenegger: Thank you. We can discuss how this situation can be improved the next time we meet? Do you have any specific suggestions or is there already some guide or plan from the past? |
In crash there was a change to load the keywords dynamically if the server side information is available: crate/crash@a01a352 In the admin interface we could do the same (and without version/availability checks, because the admin interface is version bound to specific CrateDB versions anyways) |
@mfussenegger I noticed the same thing. as a rule, I capitalize reserved keywords per the SQL standard. however, I wasn't aware of the while working on crate/crate#11418, I was trying to determine what to capitalize. I had the Admin UI open and was performing experiments already, so I was quick to arrive at the conclusion that the examples in the docs should match the capitalization in the Admin UI console (even if they weren't reserved keywords, per my usual rule of thumb) I was planning to do a follow-up PR for crash (thinking it was likely to work in a similar way to the Admin UI) but I see that that isn't possible (or desirable) should we merge this PR as is and create a new issue for implementing |
If this patch should go in in general, not taking further actions into account here, I would like to include it into the upcoming release. |
c9c64ec
to
3863a52
Compare
While editing [data-types.rst][1] in the main CrateDB Reference, I noticed that the following data types do not get automatically uppercased by the console: - `int2` - `int4` - `int8` - `name` - `oid` - `oidvector` - `regclass` - `regproc` - `timestamptz` - `timetz` This commit adds these data types to the list of keywords. [1]: https://crate.io/docs/crate/reference/en/4.5/general/ddl/data-types.html
3863a52
to
22b74dd
Compare
Is there a final verdict on whether this is appropriate to add or not? I just created #737 as a spinoff. /cc @proddata, @mfussenegger, @seut |
I think #737 is the way to go. As was already pointed out - most data types are actually not keywords. |
ack |
I have squashed all commits on this branch. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
I have squashed all commits on #11418. The old PR and old branch will be left in place until this work is complete. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
I have squashed all commits on #11418. The old PR and old branch will be left in place until this work is complete. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
I have squashed all commits on #11418. The old PR and old branch will be left in place until this work is complete. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
I have squashed all commits on #11418. The old PR and old branch will be left in place until this work is complete. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
I have squashed all commits on #11418. The old PR and old branch will be left in place until this work is complete. I am going to tease apart the changes into separate PRs: - One or more PRs that cover the changes made to individual whole docs (other than `data-types.rst`, where most of changes are). - Basic restructuring changes for `data-types.rst` so that the heading structure matches the final intended structure. - One or more PRs for the remaining changes to `data-types.rst`, each intended to cover a specific logical set changes. Specifically, for example, a PR that covers my changes for the `TIMESTAMP` data type. Changes like this are big enough to warrant review in isolation. I have chosen not to cherry-pick commits, because each doc has been visited multiple time by commits that span multiple docs. It will make it easier for: me to (as above): - Chunk it by file (except `data-types.rst`). - Prepare `data-types.rst` for the main changes by getting the document structure sorted in advance. - Slot data types changes in one-by-one, without having to alter the structure of the `data-types.rst` doc. For my reference, the rest of this commit message preserves the individual commit messages from the squashed commits. Eventually, this commit will be discarded, and any information in the commit message that needs to be preserved will be migrated to the relevant PR. --- some impromptu improvements (7494fe1) more to follow so far: - started making some light improvements to the README - ended up adding a lot of links to the main docs - ended up tidying up the pages I linked to so that readers have a good first impression if they click through - improved the intros for the three main SQL docs (syntax, compatibility, compliance) and improved how they link through to each other - (unexpectedly) ended up spending most of my time reworking the data types docs (and some adjacent PostgreSQL compat info) --- - Add `_venv/` to .gitignore (2d9978b) - Restructuring (2d9978b) - checkpoint (73670a6) - Uppercase data types added to CrateDB Admin keywords list (f7050bf) See crate/crate-admin#724 - checkpoint (caa68f1) - checkpoint (f7050bf) - finish null type, fix http doc (f7050bf) - clean up (f7050bf) - labels (f7050bf) - checkpoint (f7050bf) - finished with dates and types (f7050bf) - checkpoint (f7050bf)
While editing data-types.rst in the main CrateDB Reference, I noticed that the following data types do not get automatically uppercased by the console:
int2
int4
int8
name
oid
oidvector
regclass
regproc
timestamptz
timetz
This commit adds these data types to the list of keywords.