Using the "comment current line" and "run" keyboard shortcuts in the SQL editor leads to invisible syntax errors #16932
Closed
BernieSumption
started this conversation in
Contribute to Supabase
Replies: 2 comments
-
Note, you can achieve the same result by, in step 2 instead of hitting the "comment line" shortcut, you delete the word then |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not sure why this was converted from an issue to a discussion, but I can confirm that the issue - #12086 - is now fixed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug report
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
as
on the second line and hit⌘-/
, the code becomes:Which is valid SQL.
⌘-Enter
to submit the queryError message:
Failed to validate sql query: syntax error at or near "as"
It would seem that the editor can get itself into a state where the SQL visible to the user is not the same SQL that gets executed on
⌘-Enter
. Moving the cursor or clicking anywhere in the editor is sufficient to fix this state:⌘-Enter
again to submit the query.The query is now successful.
Expected behavior
The executed SQL should always be the same as the visible SQL.
Screenshots
System information
Additional context
As you can see in the above screenshot, highlighting the
as
word leads to two highlight markers on the screen, one over the letters and one a couple of lines below. I'm not sure if this is connected or a different issue.Beta Was this translation helpful? Give feedback.
All reactions