You are viewing a single thread.
View all comments View context
18 points

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.

permalink
report
parent
reply
4 points

That’s just cruel.

permalink
report
parent
reply
11 points

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

permalink
report
parent
reply
6 points
*

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.

permalink
report
parent
reply
2 points

I’m quite aware… basically it means that novice devs can create a table in camelCase and query in camelCase… but you can clean it all up as long as they didn’t realize you needed double quotes.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 4.3K

    Monthly active users

  • 1.5K

    Posts

  • 35K

    Comments