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

Added postgresql lexer. #1575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bithead2k
Copy link

@bithead2k bithead2k commented Aug 12, 2020

Passes the small test and adds all the keywords for PostgreSQL. This fixes #1573.

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Sep 8, 2020
@pyrmont pyrmont self-assigned this Sep 8, 2020
Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this and sorry it took a bit of time to get to it :(

I'm not very familiar with SQL but this looks like it's largely the same as the existing SQL lexer. I assume there are Postgres-specific syntax that this supports that isn't in the SQL lexer. Is that correct?

If that's the case, it would be better to subclass that lexer and then add anything you need that's extra. That way, bugs that get fixed in, or features that get added to, the SQL lexer will immediately benefit the Postgres lexer. Lexers that do this include the HQL lexer (which might be particularly relevant here) and the QML lexer.

@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Sep 8, 2020
@bithead2k
Copy link
Author

bithead2k commented Sep 8, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-action The PR has been reviewed but action by the author is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding PostgreSQL lexer
2 participants