• xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    37
    ·
    1 year ago

    Speaking as a Senior Dev specialized in database access and design… you don’t have to use all caps - SQL is actually case agnostic.

    But… but my fucking eyes man. I’m old, if your branch doesn’t have control keywords in all caps I’m going to take it out back and ol’ yeller it.

    There are few hills I’ll die on but all caps SQL and singular table names are two of them.

    • erogenouswarzone@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      The place I work decided to name all tables in all caps. So now every day I have to decide if I want to be consistent or I want to have an easy life.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Fuuuuck. That’s why I love postgres… and fuck anyone that requires double quoted identifiers for special casing.

        • icydefiance@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Postgres normalizes table and field names to lowercase, unless you put them in quotes. It’s also case sensitive.

          That means if you use quotes and capital letters when creating the table, then it’s impossible to refer to that table without using quotes.

          It also means if you rename the table later to be all lowercase, then all your existing code will break.

          Still a much better database than MySQL though.

    • Nolegjoe@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I’m a sql developer, and I am completely the opposite to you. I will find it incredibly difficult to read when everything is in caps