Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

am I the only person bothered by table names being converted to lowercase and having to painfully quote the table names that are capitalized?


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...


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.


It works the same way in Oracle - i.e., it is case-insensitive. What RDS are case-sensitive in terms of things like table/column names?


The case-insensitive identifiers is SQL-standard. I think their issue is that pg lowercases identifiers before creation / storage. That is

    create table Foo ( Bar serial );
is equivalent to

    create table "foo" ( "bar" serial );
not

    create table "Foo" ( "Bar" serial );




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: