-
Notifications
You must be signed in to change notification settings - Fork 586
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SQL] Many fixes and improvements overall #3304
base: master
Are you sure you want to change the base?
Conversation
Many thanks to your contribution. I wonder whether we can incooperate any valuable changes into #3046 as it already comes a long with a lot of improvements especially with regards to syntaxes for different SQL dialects based on one "root-syntax". |
Oh dear, I should have done a search before doing this. 馃槃 |
0ce0243
to
b1ff4dc
Compare
Yes, as @deathaxe said, please take a look at @keith-hall 's #3046. As you can see, his branch for that PR is https://github.com/forkeith/Packages/tree/sql which you can use for a diff and/or possible PRs to target and be included in #3046. |
Thanks @jrappen! Yeah I checked it out and it's looking great. There are some things I'd do differently (the leading Nevertheless, do you all think it's still worthwhile to merge this in? I don't mind if it's overwritten later by Keith's work, but until then these changes may be useful and deployed to users earlier? 馃槂 |
a PR to my branch improving PostgreSQL would be very welcome :) |
@keith-hall Alright, gonna send some commits then. 馃槂 |
What's the current status with this PR and the request to add your changes to Keith's PR? So far you have only renamed some stuff on Keith's branch and not added any meaningful changes from this PR to his. |
@jrappen From my end the PR here can go in. Keith is concerned about the leading |
* It doesn't recognize grammatically valid expressions like this: `SELECT * FROM t WHERE 1IN t.list` * Removed trailing \b from `\d+` as well for the same reason.
Replace trailing `\s+` with a `\b`. Add some missing trailing `\b`.
Also allow spaces between database name, `.` and table name.
Use `\s+` in `operator class`.
Also: give schema ids their own scope.
Don't assign storage.type.sql to whitespace.
I just rebased the branch. If the PR is still useful please merge, otherwise let's close it. I'm lacking the time and resources to continue with this... |
|
Hey!
My main goal was to fix the way the word-boundary escape
\b
is used throughout the syntax file. I did much more besides that.So I wanted, for example,
1IN
to be two tokens, and I assumed that every engine recognizes them as such, but I just tested with PSQL and MySQL and it looks like it's 2 tokens for PSQL and 1 for MySQL.I haven't looked at what the standard says yet. Regardless, I think my changes are pretty useful as they are and the thing above can be reverted by adding a
\b
back to thematch: \d+
context. My last commit is solely for formatting. Hope you like it! 馃憤