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

feat: generate PgSqlState.java from errcodes.txt #1742

Closed
wants to merge 1 commit into from

Conversation

jorsol
Copy link
Member

@jorsol jorsol commented Mar 27, 2020

This is an ad hoc hack around generate-errcodes.pl to create the PgSqlState.java class, which creates a full list of the error codes found in errcodes.txt from the postgresql server.

It's a class with String constants since having an enum version its useless, the idea would be to start using this version and slowly changing all the usage of PSQLState until it can be removed.

This PR change the Parser to throw SQLSyntaxErrorException with the PgSqlState code, a refactor for other parts of the code could follow later.

closes: #534
relates to: #963

@vlsi
Copy link
Member

vlsi commented Mar 27, 2020

@jorsol , thanks for taking time to implemet this.

However, I'm inclined to tentatively decline Perl script (which requires Perl installed) in favour of Kotlin script (which is bundled with Gradle).

PS. It would really help if you could review and/or try #1627

@jorsol
Copy link
Member Author

jorsol commented Mar 27, 2020

The perl script was just a hack around the script that the server uses, but I also think would be a better alternative to use a Kotlin/Gradle script, I'm not familiar with either Gradle or Kotlin, but I will try to find some space to review the migration to Gradle.

@jorsol jorsol closed this Mar 27, 2020
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

Successfully merging this pull request may close these issues.

missing SQLStates
2 participants