-
-
Notifications
You must be signed in to change notification settings - Fork 821
Postgres ON
preventing formatting after occurrence.
#6659
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
Comments
I suspect it's a case of adding
|
DB triggers fail to indent as well. (happy to look at this and attempt to fix in the existing PR).
|
I think I'm out of my depth. |
Search before asking
What Happened
I note that any query that I have is not formatted correctly (in terms of indentation) after a
on conflict (..) do
statement.Within the query, anything that is before the
on
is formatted absolutely perfectly, but after it fails to indent.Example of SQL to format:
Expected Behaviour
(I think I should expect this - at least, just any indentation after the
do
...)If I have just a
update
statement (without ado
) it indents as follows just fine.is converted to
Observed Behaviour
Any query that I have is indented absolutely fine until a
on conflict ... do update
is reached.Running
fix
on the above yields:How to reproduce
Here is some example SQL that will fail to indent after
on conflict .. do update
Dialect
Postgres
Version
sqlfluff, version 3.3.1
Configuration
.sqlfluff
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: