I think those aligned keywords give the wrong impression when scanning the formatted query.
here is the text if you want to toy with it:
CREATE OR REPLACE VIEW "${VIEW_SCHEMA}"."network" AS
SELECT "uuid", "VIFs_t"."VIFs"
FROM
"${TABLE_SCHEMA}"."network"
LEFT JOIN LATERAL (
SELECT
COALESCE(
array_agg(linked."VIFs" ORDER BY linked."VIFs"),
'{}'
) AS "VIFs"
FROM "${TABLE_SCHEMA}"."network_VIFs" AS linked
WHERE linked."network" = uuid
) AS "VIFs_t"
ON TRUE;
I think those aligned keywords give the wrong impression when scanning the formatted query.
here is the text if you want to toy with it: