Skip to content

PostgreSQL parser error #22

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

Closed
Niax23 opened this issue Jun 10, 2025 · 1 comment
Closed

PostgreSQL parser error #22

Niax23 opened this issue Jun 10, 2025 · 1 comment
Assignees

Comments

@Niax23
Copy link
Contributor

Niax23 commented Jun 10, 2025

  • Error Description
    After successfully configuring the LLM and database, when attempting to use CrackSQL's translate.py to convert PostgreSQL statements, the program encountered an error during parsing of the PostgreSQL statement as shown below:

Image

  • Root Cause:
    In the file ./CrackSQL/backend/preprocessor/antlr_parser/pg_parser/PostgreSQLParser.py, line 35398 the ParseRoutineBody function was undefined. The call of this function will certainly bring about error.

Image

  • Temporary Solution:
    After commenting out this line, the program ran successfully without obvious bug.

I think the tiny change of the code will make the repo better. However, I'm not sure that whether this solution is robust and elegant. Thanks, and looking forward to your insights!

@code4DB
Copy link
Collaborator

code4DB commented Jun 10, 2025

@Niax23 Thanks for your reports.
This issue is duplicated at #7. It is relevant to the generated ANTLR parser, not CrackSQL. There also exist one PR to resolve this issue at #19. You can consider to replace the files in the PR to see if such issue persists.

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