-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
bugSomething isn't workingSomething isn't workingpostgresIssues relating to the Postgres dialectIssues relating to the Postgres dialect
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
DELETE FROM ... USING ... LEFT JOIN
queries is considered invalid by SQLFluff.
Expected Behaviour
SQLFluff should not have any problem parsing this syntax.
Observed Behaviour
SQLFluff fails to parse this syntax.
How to reproduce
Try formatting this sql file:
DELETE FROM foo USING baz
LEFT JOIN bar ON baz.bar_id = bar.id
WHERE foo.id = bar.foo_id
AND baz.id = 'c';
This is a completely valid and functional PostgreSQL query, you can confirm it with the below dbfiddle link:
https://www.db-fiddle.com/f/ihqdR9heP6Cgc9ECGaA2Lk/2
Dialect
postgres
Version
sqlfluff, version 3.2.4
Configuration
[sqlfluff]
dialect = postgres
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
KholdStare
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpostgresIssues relating to the Postgres dialectIssues relating to the Postgres dialect