Skip to content

bad formatig on create table with clause  #347

@candux

Description

@candux

The output of this SQL is very hard to read. The closing line of st_union should be on the same line and the indentation is all messed up
Input:

CREATE TEMPORARY TABLE IF NOT EXISTS square_poly2 AS (
    WITH united AS (
    SELECT
        level,
        st_union (st_buffer (geom, 0.01)) AS geom
    FROM
        osmgrid._a_polygones
    GROUP BY
        level
    ),
    united2 AS (
        SELECT
            level,
            st_union (st_buffer (geom, 0.01)) AS geom
        FROM
            osmgrid._a_polygones
        GROUP BY
            level
    )
            SELECT
                *
            FROM
                united
);

Output:

CREATE TEMPORARY TABLE IF NOT EXISTS square_poly2 AS (
    WITH united AS (
    SELECT
        level,
        st_union (st_buffer (geom, 0.01)
) AS geom
    FROM
        osmgrid._a_polygones
    GROUP BY
        level),
        united2 AS (
        SELECT
            level,
            st_union (st_buffer (geom, 0.01)
) AS geom
        FROM
            osmgrid._a_polygones
        GROUP BY
            level
)
            SELECT
                *
            FROM
                united
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions