News for hackers. Stuff that matters.
Re:What I Wish Someone Told Me About Postgres by WorldMaker on Tuesday November 12, 2024 @11:03PM (#42122796)
It's a bit of a "Why not both?" situation, I think? You can have blocks and sentence case:

    Select   *
    from     the_table
    where    some_column = 12
    and      other_column is not null
    order by order_column;
That seems so much more readable to me. As I said, that single capital `S` in the outermost "select" has come in surprisingly handy in my experience when scanning through a collection of statements or a transaction or a stored procedure or even just a statement with a bunch of nested sub-selects. It's an interesting advantage I find over "all lower case" or "all upper case" keywords.
Re:What I Wish Someone Told Me About Postgres by 4ggr0 on Wednesday November 13, 2024 @05:10AM (#42124686)
your example is less readable for me. not by a lot, but still.

the other example has the commands, in caps, on the left and the values on the right, in lowercase. your example removes one of those aspects and makes everything lowercase. my brain can ignore all-caps stuff, as these are just commands and the things i actually care about mostly are the values.

but i mean, in the end, it's just preferences. if you write SQL-queries, #1 is that you understand them well :)

Re:What I Wish Someone Told Me About Postgres by Ntrails on Wednesday November 13, 2024 @07:48AM (#42125607)
> your example is less readable for me. not by a lot, but still

Agree, but I wonder how much of that is just the lack of colouring. My brain is suuuuper hard wired to expect all the special keywords to be identified that way as well as by case.

Mostly I'm a caps guy because my ahk scripts expand text like "ssf","w" and "gb"* to be the way I learned to write them at first.