Search Postgresql Archives

Re: Camel case identifiers and folding

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

 





On Thu, Mar 14, 2019 at 11:07 PM Steve Haresnape <s.haresnape@xxxxxxxxxxxxxxxxxxxxxxx> 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.
http://www.efficito.com/learn_more

[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