sqlfluff / sqlfluff

A modular SQL linter and auto-formatter with support for multiple dialects and templated code.
https://www.sqlfluff.com
MIT License
7.45k stars 674 forks source link

False positive on SET CONSTRAINTS ALL DEFERRED #5926

Open IttayWeiss opened 1 month ago

IttayWeiss commented 1 month ago

Search before asking

What Happened

Gives false positive on valid SQL with SET CONSTRAINTS

Expected Behaviour

Parsing as valid SQL.

Observed Behaviour

Parsing violations reported.

How to reproduce

sqlfluff parse test.sql --dialect postgres

where test.sql is: SET CONSTRAINTS ALL DEFERRED;

Dialect

Postgres

Version

3.0.5

Configuration

None

Are you willing to work on and submit a PR to address the issue?

Code of Conduct

IttayWeiss commented 1 month ago

Possibly the same sort of false positive when running on:

CREATE CONSTRAINT TRIGGER "some_trigger" AFTER INSERT ON "some_table" DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE some_procedure();