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 fromstdinby default. (and heads up, if you used the--statementoption, this input source doesn't apply β see the note on it below π)outfileβ where the gorgeous result gets written. left alone, it goes tostdoutlike 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-marginCOMPACT_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-literalsSPLIT_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,--statementSTATEMENT β 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 β theinfileslot (which isstdinby 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
- ubuntu stonking: python3-pglast 8.4-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms