Skip to content
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

bad formatig on create table with clause #347

Open
candux opened this issue Sep 24, 2024 · 0 comments
Open

bad formatig on create table with clause #347

candux opened this issue Sep 24, 2024 · 0 comments

Comments

@candux
Copy link

candux commented Sep 24, 2024

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
);
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

No branches or pull requests

1 participant