Re: Camel case identifiers and folding

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Camel case identifiers and folding
Дата
Msg-id CAKt_Zfv9zxq9Hba+tTE5Euj+W4vq4vbmJ0gHrT12ifNAtPma_g@mail.gmail.com
обсуждение исходный текст
Ответ на Camel case identifiers and folding  (Steve Haresnape <s.haresnape@creativeintegrity.co.nz>)
Ответы Re: Camel case identifiers and folding
Список pgsql-general


On Thu, Mar 14, 2019 at 11:07 PM Steve Haresnape <s.haresnape@creativeintegrity.co.nz> wrote:
I'm porting a sql server database to postgresql 9.6. My camelCase identifiers are having their humps removed. This is disconcerting and sad.

Is there a cure for this?

Double quote them. 

I don't want to quote my identifiers unless I have to. I don't want to use underscores. Everywhere else I write code I use camel case. I makes me feel warm inside.

The SQL standard mandates case folding.  We don't quite follow the standard (which mandates folding to upper case) because nobody here likes that, and so we fold to lower case.  In most cases, however, our behavior is close to that of the standard. 

This is folding in the same sense Procrustes folded his guests to fit his bed.

The sql standard has some dumb stuff in it. Do not appeal to it. It can be safely ignored in this regard (by Microsoft, and anyone else wishing to prevent the propagation of stupidity).

MySQL also ignores the standard and does not fold cases.  You can weigh this point vs what you give up by going that direction..... 

The only mechanism available to put any semantics into the database is via the naming of identifiers. Why screw with that? Imagine what would happen if your IDE decided to do that to your java code.


Different languages address case and identifiers differently, no?

Why should PostgreSQL follow a Java standard? 


--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.

В списке pgsql-general по дате отправления:

Предыдущее
От: Morris de Oryx
Дата:
Сообщение: Re: Camel case identifiers and folding
Следующее
От: Chris Travers
Дата:
Сообщение: Re: Fwd: Camel case identifiers and folding