Search Postgresql Archives

Allow disabling folding of unquoted identifiers to lowercase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux