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
Add PostgreSQL Explain lexer #2398
Conversation
This lexer add support for PostgreSQL Explain plan : https://www.postgresql.org/docs/current/sql-explain.html This was heavily inspired by Maxence Ahlouche work, thanks to him : https://github.com/maahl/pg_explain_lexer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits. Can you please add some tests too?
Thanks for your review! I will try to add some tests, but it will be hard to cover all the rules :/ |
Now looks good (I added a commit to fix minor issues), only awaiting some tests. (See https://pygments.org/docs/contributing/#how-lexers-are-tested for how to add them.) |
Thanks! I added some tests. Unfortunately, it is hard to cover all keywords :( |
No need to cover all elements of a |
Thanks! |
Hello,
I suggest this lexer to handle PostgreSQL execution plan obtained thanks to EXPLAIN command (https://www.postgresql.org/docs/current/sql-explain.html).
This work was inspired by Maxence Ahlouche work (https://github.com/maahl/pg_explain_lexer).
I tried to do my best to test and handle most of the cases. I added a keyword
[...]
which can be useful to truncate very long lines.Thanks