-
-
Notifications
You must be signed in to change notification settings - Fork 13
Any non-keyword word is considered as identifier #189
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
Comments
This is also an issue for any non-postgres SQL dialect that has more/some other keywords. |
If we did that though, then no strings would be marked as identifiers.
I guess that's a better argument, although I cringe to think that in a string like below, "a" and "c" would be marked as keywords rather than identifiers:
The current architecture (doing everything by regexp) has inherent limitations, so there need to be some compromises. It seems like adding all those strings as keywords might make things worse (overall) rather than better. |
PS: I guess what I'm saying is that it's only safe to list reserved keywords in the keywords section (and "returning" is non-reserved). |
Hey there. I think to avoid the odd cases such as |
Another question, I am running into problems, with insert into "schema"."tbl_name"... where schema.tbl_name will be considered string instead of identifier. |
@kodi - I think that's just how it works; the whole architecture is based on regexps so there's no way to differentiate between the two strings in this example:
Actually I'm surprised you can quote schema or table names at all. Can you quote column names too? Given a command like below, how could a database know that "name" is a column but "Bill" is a literal string?
|
Describe the bug
In this example
returning
keyword is not in keywords list and is considered asidentifier
.Expected behavior
Any non-keyword should be considered
unknown
or all keywords should be added to the keywords list.All keywords can be taken from postgres docs
Screenshots
sql-highlight (please complete the following information):
The text was updated successfully, but these errors were encountered: