Skip to content

Incorrectly formats variable assignation #502

Closed
@federico-hero

Description

@federico-hero

Describe the bug

Incorrectly formats variable assignation operator := as : =.

To Reproduce

Run this correct SQL through sqlfmt:

select partman.create_parent( 'public.deliveries_finished', 'created_at', 'native', 'daily', p_premake := 20) ;

Expected behavior

select
    partman.create_parent(
        'public.deliveries_finished', 'created_at', 'native', 'daily', p_premake := 20
    )
;

Actual behavior

Notice the separation between the colon and the equal sign:

select
    partman.create_parent(
        'public.deliveries_finished', 'created_at', 'native', 'daily', p_premake: = 20
    )
;

Additional context

sqlfmt, version 0.20.0

This makes the SQL to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions