News for hackers. Stuff that matters.
Re:Common mistakes in PostgreSQL by Seb-C on Friday May 03, 2019 @10:04AM (#19818515)
This is one of the main things I hate in PgSQL... Arbitrarily converting identifiers in any way is a very bad practice in my opinion. I should be the one to decide how I want to design my database and namings, not some arbitrary rule. I especially want my database and my code to be consistent, and snake_case is far from being the most used convention...
Re:Common mistakes in PostgreSQL by BenMorganIO on Friday May 03, 2019 @12:25PM (#19819760)
You sure? All the projects I've worked on have used snake case. I've only seen newcomers to programming use capitalized table names.
Re:Common mistakes in PostgreSQL by dekhn on Friday May 03, 2019 @06:17PM (#19822762)
I'm working with data where the columns in another DB are already CamelCase and I want to maintain consistency. I'm not a newcomer- I've been programming for 30+ years.
Re:Common mistakes in PostgreSQL by dllthomas on Friday May 03, 2019 @12:37PM (#19819906)
I think parent meant in programming languages generally.
Re:Common mistakes in PostgreSQL by zeroimpl on Friday May 03, 2019 @08:24PM (#19823420)
Agreed. I work on databases where column names are capitalized throughout our source code, and it’s annoying when sql like “SELECT FirstName FROM ...” gets output as “firstname”.

This is one case where MySQL seems a bit better.

Note if I could I’d change to lowercase underscore naming conventions, but it’s impossible to change now.