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

Postgres dialect no support for DROP SCHEMA or SET SCHEMA: " Found unparsable section" #1080

Closed
jdsada30 opened this issue May 20, 2021 · 0 comments · Fixed by #1135
Closed
Labels
bug Something isn't working good first issue Good for newcomers postgres Issues relating to the Postgres dialect

Comments

@jdsada30
Copy link

-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the sqlfluff parse output, sqlfluff lint output and sqlfluff fix output when relevant. Finally, please add any labels that are related to the issue before submitting so that it can be addressed easily! --

Expected Behaviour

I would expect SQLFluff to correctly parse and lint statements to set or drop schemas, which is supported, for example, by PostgreSQL. Create schema however seems to be parsed correctly.

Observed Behaviour

"Found unparsable section"

L: 1 | P: 1 | PRS | Found unparsable section: 'DROP SCHEMA vertx'
L: 3 | P: 1 | PRS | Found unparsable section: 'SET SCHEMA vertx'

Steps to Reproduce

  1. Create a sql file with the following queries:

$ cat test.sql
DROP SCHEMA vertx;
CREATE SCHEMA vertx;
SET SCHEMA vertx;

  1. Lint the file with the following command :

sqlfluff lint test.sql --dialect postgres or sqlfluff lint test.sql

Version

I'm using sqlfluff version 0.5.6 and python version 3.8.5. Found this while executing queries from the following github project: vertx-jooq

@jdsada30 jdsada30 added the bug Something isn't working label May 20, 2021
@NiallRees NiallRees added the good first issue Good for newcomers label May 28, 2021
@barrywhart barrywhart added the postgres Issues relating to the Postgres dialect label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers postgres Issues relating to the Postgres dialect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants