pgFormatter icon indicating copy to clipboard operation
pgFormatter copied to clipboard

indentation of FROM and WHERE in longer subquery doesn't match

Open hew-wolff opened this issue 4 years ago • 1 comments

Much like https://github.com/darold/pgFormatter/issues/240.

SELECT
    SELECT
        sum(amount)
    FROM
        payments + /* keep this comment to avoid crash */ (
            SELECT
                sum(amount)
            FROM payments
            WHERE
                owner_id IN (
                    SELECT
                        id
                    FROM invoices)) + coalesce((
            SELECT
                sum(amount)
            FROM payments
        WHERE
            TYPE IN ('xxx')), 0);
$ pg_format -v
pg_format version 5.0

hew-wolff avatar Apr 08 '21 19:04 hew-wolff

I'm having the same problem as well.

sk-shishi avatar Jan 20 '23 19:01 sk-shishi