PGPP(1)

✨ PGPP πŸ’…

okay bestie, listen up β€” this is the manual page for pgpp, the PostgreSQL language prettifier. yeah. it makes your crusty SQL look ✨beautiful✨. i'm not kidding, this thing is genuinely iconic and i'm gonna walk you through every single flag like a true main character. πŸŽ€


🌸 NAME 🌸

pgpp β€” the PostgreSQL language prettifier. that's it, that's the whole vibe. it takes SQL that looks like it got dragged through a hedge backwards and hands you back something you'd actually screenshot. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

usage: pgpp [-h] [-v] [-p] [-t] [-n] [-m COMPACT_LISTS_MARGIN]
       [-s SPLIT_STRING_LITERALS] [-f] [-F] [-c] [-e] [-C] [-S STATEMENT] [infile] [outfile]

πŸ‘‘ DESCRIPTION πŸ‘‘

PostgreSQL language prettifier ✨

that's the tagline, that's the energy. now let's get into the actual parts, because there's a lot of levers to pull here and every single one of them is getting its moment. no skipping, no summarising, we are doing ALL of them. periodt. πŸ’…

πŸ“₯ positional arguments:

  • infile β€” a file containing the SQL statement you want prettyprinted. if you don't hand one over, it reads from stdin by default. (and heads up, if you used the --statement option, this input source doesn't apply β€” see the note on it below πŸ‘€)
  • outfile β€” where the gorgeous result gets written. left alone, it goes to stdout like a good little default.

πŸŽ›οΈ options:

  • -h, --help β€” shows this help message and then dips out. classic.
  • -v, --version β€” shows the program's version number and exits. quick flex.
  • -p, --plpgsql β€” use the plpgsql parser. lowkey important: this one implies --parse-tree, so you don't have to ask twice. 🫢
  • -t, --parse-tree β€” instead of prettifying, show the resulting parse tree. it's giving "peek behind the curtain". 🌈
  • -n, --normalize β€” show the normalized statement, with no prettification at all. ngl, some of the options below may straight up have no effect when you use this one. not being shady, that's just how it is. 😭
  • -m, --compact-lists-margin COMPACT_LISTS_MARGIN β€” use the compact form for lists that don't exceed the margin you give it. small lists get the cosy treatment. πŸ“
  • -s, --split-string-literals SPLIT_STRING_LITERALS β€” split string literals that are longer than the value you give. long strings found deceased. πŸ’€
  • -f, --special-functions β€” activates special functions handling. turn it on and let it cook. πŸ”₯
  • -F, --remove-pg_catalog-from-functions β€” omit the explicit "pg_catalog" schema from function names, when possible. tidier, cleaner, slay. ✨
  • -c, --comma-at-eoln β€” an alternative style for printing lists: it puts the comma right after each item. yes, that argument. the eternal one. pick your side, bestie. πŸ’…
  • -e, --semicolon-after-last-statement β€” ends the last statement with a semicolon. closure. we love that for you. πŸŽ€
  • -C, --preserve-comments β€” preserves the comments in the statement. your little notes stay exactly where you left them, protected, thriving. πŸ’œ
  • -S, --statement STATEMENT β€” the SQL statement itself, passed right here on the command line.
heads up bestie: when you use -S/--statement, that's where the SQL comes from β€” the infile slot (which is stdin by default) isn't the source in that case. iykyk. πŸ™ˆ

🌈 that's a wrap 🌈

this page came to you courtesy of pgpp running with the PostgreSQL 18.4 parser, dated July 2026 β€” and it's filed under User Commands, section 1 of the manual, which is the iconic-est section imo. 🧚 go forth and prettify, you absolute legend, you ate. πŸ‘‘β­πŸ’–

πŸ“¦ where this page comes from