Allow disabling folding of unquoted identifiers to lowercase - Mailing list pgsql-general

From Evgeny Morozov
Subject Allow disabling folding of unquoted identifiers to lowercase
Date
Msg-id CALtd4uXe-CeDxg1Xvtdxp6EBAa6WEk4jjwwrLP90-wZbVS26KQ@mail.gmail.com
Whole thread Raw
Responses Re: Allow disabling folding of unquoted identifiers to lowercase
Re: Allow disabling folding of unquoted identifiers to lowercase
List pgsql-general
It would be great if Postgres had a server setting that allowed the automatic folding of identifiers to lowercase to be disabled, so that camel case identifiers could be used without having to quote every single identifier, i.e.

SELECT MyColumn FROM MyTable ORDER BY MyColumn

instead of

SELECT "MyColumn" FROM "MyTable" ORDER BY "MyColumn"

I understand that Postgres has a well-established naming convention and I'm certainly not suggesting changing the default behaviour, but having this as an option would remove a major pain point for users migrating from another RDBMS, like MS SQL Server.

My company is looking into doing this. Currently our table and column names exactly match our class and property names, which are in camel case. MSSQL supports this just fine. To move to Postgres we would have to either quote *everything* or translate names back-and-forth between code and database. Both options are OK for auto-generated SQL, but we also have many users writing ad-hoc SQL queries. Having to quote everything would have those users screaming to switch back to MSSQL very quickly! That leaves us with the mapping approach, which is doable, but also a constant "mental speedbump" at best.

pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Postgres processes getting stuck (bug?)
Next
From: John R Pierce
Date:
Subject: Re: Allow disabling folding of unquoted identifiers to lowercase