All apps/pgFormatter

pgFormatter

pgformatter

A PostgreSQL SQL syntax beautifier and formatter.

Runs as pg_format|macOS, Linux, Windows|github.com

Command form

ai-draft · 2 tasks · 11 fields

Beautify one or more SQL files with pg_format. Output goes to stdout unless an output file or in-place is chosen. Placeholders, extra keyword files and HTML output are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui pgformatter
Format SQLExample values, fixed in this page — nothing here reaches a terminal
Basic
SQL files*
file
Indent width
integer
Keyword case
3 choicesenum
TasksEach one presets the form for one job
Format to stdout
filesspaceskeyword_case
Format files in place
filesinplacespaceskeyword_case
ParametersOnly these flags are editable in the form
SQL files
Use - to read from stdin.
path · positional 0 · repeatable
Output file
path
--output-o
Rewrite input files in place
boolean
--inplace-i
Indent width
integer
--spaces-s
Indent with tabs
boolean
--tabs-T
Keyword case
enum
--keyword-case-u012
Function case
enum
--function-case-f0123
Remove comments
boolean
--nocomment-n
Leading commas
boolean
--comma-start-b
Wrap at column
integer
--wrap-limit-w
Ignore rc files
boolean
--no-rcfile-X
SourcesEvery flag above is checked against these
help
Usage: pg_format [options] file.sql file.sql can be a file, multiple files or use - to read query from stdin. -b | --comma-start : in a parameters list, start with the comma (see -e) -f | --function-case N: Change the case of the PostgreSQL functions. Default 2=>uppercase, 3=>capitalize. -i | --inplace : override input files with formatted content.…
manual2026-10-27

raw.githubusercontent.com

Before it fills your prompt, Otty checks the installed pg_format against its version. A form that does not match your version is not offered.