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...
[ Parent
| on HN ]
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.
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.
I think parent meant in programming languages generally.
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.