8000 `ON CONFLICT` indentation for Postgres by WillMatthews · Pull Request #6660 · sqlfluff/sqlfluff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ON CONFLICT indentation for Postgres #6660

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

Merged
merged 5 commits into from
Mar 29, 2025

Conversation

WillMatthews
Copy link
Contributor

Hoping to close #6659
I think this is the change that's needed to resolve the problem I'm seeing.

This is my first contribution here -- so I hope I'm doing everything right! Please do let me know if I'm not. 😄

Brief summary of the change made

Postgres ON CONFLICT statements had no indentation for the SET or inside the SET stmt. See #6659 for an example of the lacking indentation.

Are there any other side effects of this change that we should be aware of?

No known side effects.

Pull Request checklist

  • Please confirm you have completed any of the necessary steps below.
  • Included test cases to demonstrate any code changes, which may be one or more of the following:
    • .yml rule test cases in test/fixtures/rules/std_rule_cases.

TODO

  • Add appropriate documentation for the change.

"SET",
Indent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one should be ImplicitIndent

@cuongvd23
Copy link

Hi @WillMatthews, any updates on this PR? I really wanna see this feature in the upcoming version. Many thanks!

@WillMatthews
Copy link
Contributor Author

My apologies @cuongvd23, I've had a pretty hectic few weeks. I'll work on this today.

@WillMatthews WillMatthews marked this pull request as ready for review March 29, 2025 15:09
Copy link
Contributor
@WittierDinosaur WittierDinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WittierDinosaur WittierDinosaur added this pull request to the merge queue Mar 29, 2025
Copy link
Contributor

Coverage Results ✅

Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL   19481      0   100%

248 files skipped due to complete coverage.

Merged via the queue into sqlfluff:main with commit 9c9861f Mar 29, 2025
28 checks passed
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

Successfully merging this pull request may close these issues.

Postgres ON preventing formatting after occurrence.
3 participants
0