News for hackers. Stuff that matters.
Re:SQL style guide by Simon Holywell by dagss on Friday November 15, 2024 @02:09AM (#42144569)
Why do you not make that argument for "if" and "else" in Go/Java/...?

Editors highlight syntax.

Re:SQL style guide by Simon Holywell by thiht on Friday November 15, 2024 @02:41AM (#42144702)
Editors don’t syntax highlight SQL queries written as strings. That’s the main reason I write my queries with uppercase keywords in my Go programs
Re:SQL style guide by Simon Holywell by wcrossbow on Friday November 15, 2024 @03:05AM (#42144824)
Editors can highlight SQL queries embedded as strings. Neovim can do it, and I'm pretty confident it's not going to be alone in that respect.

edit: Not the editor I use but thought it might be helpful. Here is an extension, which I haven't tested, to do this in VSCode: https://marketplace.visualstudio.com/items?itemName=iuyoy.hi...

Re:SQL style guide by Simon Holywell by mijamo on Friday November 15, 2024 @07:27AM (#42146286)
I have never seen a syntax highlighter for SQL that actually covers the real deal from Postgres dialect. Basic stuff is covered and then suddenly you use a combination that isn't covered and the colors are all wrong. This is even true for pgadmin, which is ironic. Unlike most programming languages, SQL built in syntax is huuuuuge and it is very hard to cover it all, especially as it varies with the dialect.
Re:SQL style guide by Simon Holywell by eddd-ddde on Friday November 15, 2024 @12:45PM (#42149133)
Any jetbrains IDE with sql tools will work perfectly in my experience.
Re:SQL style guide by Simon Holywell by emmelaich on Friday November 15, 2024 @09:20PM (#42153581)
Maybe it's time for programming languages for use something like markdown in strings for embedded sql and dsl. e.g.

```sql

```

Re:SQL style guide by Simon Holywell by dagss on Thursday November 21, 2024 @12:13PM (#42206390)
I use Jetbrains and there is at least full coverage for MSSQL in my experience, which is a huge dialect -- not only syntax highlighting but full IDE features like autocompletion and target name refactoring etc.

And 10 other dialects are listed..

Re:SQL style guide by Simon Holywell by vlvdus on Friday November 15, 2024 @05:10AM (#42145484)
That would be a nice change too. Also THEN, BEGIN, END to replace varous brackets.