Skip to content

Development of the Official SQL Formatter #279

@xterao

Description

@xterao

Enhance support for the following cases and release it as the official version:

  • Support for the PostgreSQL dialect
    Improve handling of PostgreSQL-specific syntax and conventions.

  • Support for nested conditional and loop directives
    Accurately format deeply nested if, elseif, else, and for structures within SQL templates.

  • Support for bulk UPDATE syntax (already implemented)
    Confirm and maintain correct formatting for batch update patterns.

  • Establish formatting rules for consecutive AND / OR clauses
    Define consistent line-breaking and indentation behavior for logical operator sequences in WHERE or ON clauses.

  • Whitespace control before and after subgroups
    Fine-tune spacing rules around logical or visual groupings within SQL statements.

  • Line break and indentation control for elements between block comments
    Ensure elements placed between /* ... */ comments are formatted cleanly with appropriate spacing and indentation.

This enhancement will provide consistent, dialect-aware, and highly readable SQL formatting suitable for production use.

Sub-issues

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions