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

Why there's no grammar for PostgreSQL? #1501

Closed
sulaukad opened this issue Aug 29, 2019 · 9 comments
Closed

Why there's no grammar for PostgreSQL? #1501

sulaukad opened this issue Aug 29, 2019 · 9 comments
Labels
new-grammar New grammar issue or pull request

Comments

@sulaukad
Copy link

I'm looking for PostgreSQL grammar, but I can't find any solution. There are few 5 years old repos on git hub with a proprietary license which is not suitable for me.

@KvanTTT KvanTTT added the new-grammar New grammar issue or pull request label Aug 29, 2019
@KvanTTT
Copy link
Member

KvanTTT commented Aug 29, 2019

There are at least several implementations:

Also, maybe it makes sense to look at our PL/SQL or MySQL grammars. Maybe there are a lot of things in common.

@Marti2203
Copy link
Contributor

@KvanTTT
@sulaukad
I can try porting this weekend if the author of the recent one has not responded

@KvanTTT
Copy link
Member

KvanTTT commented Sep 12, 2019

I would wait at least one month because of @tshprecher (author) wrote in abovementioned issue the following:

Let me scramble to get as much done of this by the end of Oct 1 (one month).

@mitar
Copy link
Contributor

mitar commented Sep 16, 2019

Related: https://github.com/lfittl/libpg_query

@yuanzhonglin
Copy link

hello,I'm also looking for PostgreSQL grammar files,have you found it? I would appreciate it if you could offer some help.

@Marti2203
Copy link
Contributor

Check the two repositories linked and see if they are good enough for you. If not, message the maintainers of them to see what is going on. I am still interested in working on them.

@AXEPOH
Copy link

AXEPOH commented Jan 24, 2020

Hello, you can use our solution (it includes Postgres 12):
https://github.com/pgcodekeeper/pgcodekeeper/blob/master/ru.taximaxim.codekeeper.core/antlr-src/SQLParser.g4

@BowenXiao1999
Copy link

https://github.com/apache/shardingsphere/tree/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4
ShardingSphere also has a antlr4 for PG.

@KvanTTT KvanTTT closed this as completed Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-grammar New grammar issue or pull request
Projects
None yet
Development

No branches or pull requests

9 participants