PgFormatter: A PostgreSQL SQL syntax beautifier
1–10 of 33 posts
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#2[1] http://sqlformat.darold.net/
Also, a similar tool was recently discussed: https://news.ycombinator.com/item?id=18087514
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#3I remember trying the one from TFA and NOPE-ing out immediately. Similarly, "sqlfmt" that was on HN recently. If there was an official Postgres formatter, I would probably persevere despite whatever oddities it would inevitably have.
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#4Maybe you do, but that doesn't seem very OSS.
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#5(Implementing a SQL formatter in pure SQL is not impossible, but would be quite a tour de force. Just a thought.)
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#6The stark difference between a formatter and a formatter officially blessed by the parent project, is that the former is far more vulnerable to having its output viewed with a jaundiced eye and the formatter being cast away. I remember trying the one from TFA and NOPE-ing out immediately. Similarly, "sqlfmt" that was on HN recently. If there was an official Postgres formatter, I would probably persevere despite whate…
Re: PgFormatter: A PostgreSQL SQL syntax beautifier
#7The stark difference between a formatter and a formatter officially blessed by the parent project, is that the former is far more vulnerable to having its output viewed with a jaundiced eye and the formatter being cast away. I remember trying the one from TFA and NOPE-ing out immediately. Similarly, "sqlfmt" that was on HN recently. If there was an official Postgres formatter, I would probably persevere despite whate…
The sqlfmt one pulls in the cockroachdb parser, and that team has a fairly big incentive to be compatible with PG syntax. Nobody is perfect, but it seems set up to stay current/correct.
Not knocking either project - just pondering adoption.