Re: Camel case identifiers and folding - Mailing list pgsql-general

From Chris Travers
Subject Re: Camel case identifiers and folding
Date
Msg-id CAKt_Zfv9zxq9Hba+tTE5Euj+W4vq4vbmJ0gHrT12ifNAtPma_g@mail.gmail.com
Whole thread Raw
In response to Camel case identifiers and folding  (Steve Haresnape <s.haresnape@creativeintegrity.co.nz>)
Responses Re: Camel case identifiers and folding  (Thomas Kellerer <spam_eater@gmx.net>)
List 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 by date:

Previous
From: Morris de Oryx
Date:
Subject: Re: Camel case identifiers and folding
Next
From: Chris Travers
Date:
Subject: Re: Fwd: Camel case identifiers and folding