Allow disabling folding of unquoted identifiers to lowercase

Поиск
Список
Период
Сортировка
От Evgeny Morozov
Тема Allow disabling folding of unquoted identifiers to lowercase
Дата
Msg-id CALtd4uXe-CeDxg1Xvtdxp6EBAa6WEk4jjwwrLP90-wZbVS26KQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Allow disabling folding of unquoted identifiers to lowercase  (John R Pierce <pierce@hogranch.com>)
Re: Allow disabling folding of unquoted identifiers to lowercase  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список 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 по дате отправления:

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: Re: Postgres processes getting stuck (bug?)
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Allow disabling folding of unquoted identifiers to lowercase