Do we need to use caps for SQL keywords? My understanding is that it served a purpose back in the days of monochrome screens, but modern IDEs colour the keywords so caps are now redundant. Though I don't use caps even without colouring, I find them just a nuisance.
No, not at all. SQL is case agnostic unless you're talking about field collations or, in many systems, object names. It's also largely whitespace agnostic. Many RDBMSs will handle this just fine:
The most productive language of Gilles, well-known in the Postgres community by the way, is perl, and he can do completely crazy things with it. See for example pgbadger (https://github.com/darold/pgbadger), one of his other projects.
Am I the only one irked by the concept of beautiful SQL? SQL is beautiful by itself. Pick a style (indents,caps,whatever) that fits the project at hand. I have found it useful to write the more mundane parts of a project like a regular paragraph with minimal whitespace, and do more whitespace in areas that are more complex or more likely need attention later. Depending too much on a standard style (ironically) lends itself to some pretty ugly code, eg. tangling too many joins and subqueries that would be far better handled by separate statements.
The 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 whatever oddities it would inevitably have.
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.
I've never heard of a code formatter called a "syntax beautifier" before. The phrase "syntax beautifier" sounds more like a compiler plug-in that actually changes the language syntax to something more beautiful.
It's a relatively common name. I would say it might even be more common than the alternative of "code formatter". I do agree that the syntax of the language isn't changing, but it does seem like the phrase that has stuck.
I really hope there will be a sql formatter like prettier for javascript, I have tried Intellij's sql formater and mysql workbench's sql formatter, neither has some warts.
[1] http://sqlformat.darold.net/
Also, a similar tool was recently discussed: https://news.ycombinator.com/item?id=18087514