You can format the sql script using VS Code. Right-Click > Format Document With... > PostgreSQL or directly Right-Click > Format Document once VS Code detected it as sql script VS Code SQL Formatting