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

Parsing postgres scripts fails with when it contains CREATE EXTENSION #93

Closed
buttilda opened this issue Nov 1, 2024 · 1 comment
Closed

Comments

@buttilda
Copy link

buttilda commented Nov 1, 2024

To reproduce attempt formatting this:

CREATE EXTENSION IF NOT EXISTS pgcrypto;

You'll get the following error:

Syntax Error: Unexpected "EXTENSION"
Was expecting to see: "EXTERNAL", "FOREIGN", "FULLTEXT", "GLOBAL", "INDEX", "LOCAL", "MATERIALIZED", "OR", "RECURSIVE", "SEARCH", "SNAPSHOT", "SPATIAL", "TABLE", "TEMP", "TEMPORARY", "TRIGGER", "UNIQUE", "UNLOGGED", "VECTOR", "VIEW", "VIRTUAL", or whitespace
--> undefined:1:8
  |
1 | CREATE EXTENSION IF NOT EXISTS pgcrypto;
@nene
Copy link
Owner

nene commented Nov 2, 2024

Thanks for reporting. This happens simply because a large part of PostgreSQL is not yet implemented by the parser.

You can see a work-in-progress list of what is and isn't supported in here: #40

I've created a separate task for the CREATE/ALTER/DROP EXTENSION syntax support and will close this one.

@nene nene closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
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

2 participants