PostgreSQL SQL formatting
PostgreSQL has an expressive SQL dialect with features not found in the SQL standard: window functions, RETURNING clauses, WITH (CTE) support, JSONB operators, and double-quoted identifiers. Using the PostgreSQL dialect ensures these constructs are formatted correctly.
This formatter handles PostgreSQL-specific syntax including ILIKE, SIMILAR TO, :: cast syntax, LATERAL joins, and array expressions. Standard SQL formatters may produce incorrect results for these constructs.
How to format PostgreSQL queries
- Paste your PostgreSQL query into the text area above.
- The formatter is pre-set to PostgreSQL dialect. Toggle keyword casing as needed.
- Copy the formatted output with the Copy button or
Ctrl+K.