Skip to content
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

The parser does not support parenthesis after USING clause #1983

Closed
radegran opened this issue Nov 1, 2024 · 2 comments
Closed

The parser does not support parenthesis after USING clause #1983

radegran opened this issue Nov 1, 2024 · 2 comments
Assignees

Comments

@radegran
Copy link

radegran commented Nov 1, 2024

The parser does not accept left parenthesis after USING clause. The generative AI model I use for generating SQL queries keeps adding parentheses.

Example:

SELECT * FROM ? a JOIN ? b USING (c)

SyntaxError: Parse error on line 1:
... ? a JOIN ? b USING (c)
-----------------------^
Expecting 'LITERAL', 'BRALITERAL', got 'LPAR'

This fiddle shows the details.

@paulrutter
Copy link
Contributor

paulrutter commented Nov 1, 2024

I recently proposed changes to the parser, see #1982. This shows it's probably not hard to support parentheses as well.

Probably here:

: USING FromTable

Add another case including LPAR and RPAR.

@mathiasrw mathiasrw self-assigned this Dec 19, 2024
@mathiasrw
Copy link
Member

Released as part of v4.6.1

mathiasrw added a commit that referenced this issue Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants