pgFormatter
pgFormatter copied to clipboard
indentation of FROM and WHERE in longer subquery doesn't match
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
I'm having the same problem as well.